需要在 WordPress 的 jQuery 工具提示中嵌入重力形式表单
我正在尝试嵌入重力形式表单 - http://gravityforms.com/ - 在 jQuery 工具工具提示中 - http://flowplayer.org/tools/tooltip/index.html - 在 WordPress 上网站 - http://buccan.mynewsitepreview.com/。
jQuery 工具“工具提示”插件效果很好;您可以通过将鼠标悬停在页脚中的任何链接上来查看它的运行情况。但是,当使用短代码嵌入重力表单时, 标签(用作工具提示的容器)会自动关闭。这会将表单置于工具提示内容区域之外。
有谁知道如何让表单显示在工具提示中?如果可能的话,我想避免使用覆盖层,因为我希望链接将用户带到点击时的联系页面(以防 JavaScript 被禁用)。
提前致谢!
* 编辑*
我上面的问题可能太模糊了...
默认情况下,jQuery 工具手动工具提示使用紧邻触发器旁边的元素作为工具提示内容。我的触发器是与“tooltip_trigger”类的链接,紧随其后的元素是一个跨度。
在该跨度内,我想放置一个重力表单,但 PHP 会导致跨度标签在为表单创建 HTML 之前自动关闭。
所以我真正的问题是:有没有办法改变 jQuery Tools 工具提示的行为,以便它不会立即查找触发器之后的元素,而是使用具有特定 ID 或类的元素(位于页面上的其他位置) )作为工具提示内容?
I'm trying to embed a Gravity Forms form - http://gravityforms.com/ - within a jQuery Tools tooltip - http://flowplayer.org/tools/tooltip/index.html - on a WordPress website - http://buccan.mynewsitepreview.com/.
The jQuery Tools 'Tooltips' plugin works great; you can see it in action by hovering over any of the links in the footer. However, when using the shortcode to embed a Gravity Form, the <span>
tag - which serves as a container for my tooltip - automatically closes. This puts the form outside of the tooltip content area.
Does anyone have an idea of how I can get the form to display inside the tooltip? I'd like to avoid using an overlay if possible, because I want the link to take the user to a contact page on click (in case javascript is disabled).
Thanks in advance!
* EDIT *
My question above may have been too vague...
By default, the jQuery Tools manual tooltip uses the element immediately next to the trigger as the tooltip content. My trigger is a link with the class 'tooltip_trigger', and the element that immediately follows is a span.
Within that span I would like to place a Gravity Form, but the PHP causes the span tag to close automatically before creating the HTML for the form.
So my real question is: Is there any way to change the behavior of the jQuery Tools tooltip so that it does not look for the element immediately following the trigger, but rather uses an element with a specific ID or class (located elsewhere on the page) as the tooltip content?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题解决了。 span 标签是问题所在;将重力形式包装在 div 标签中效果非常好。
当你过度思考一个问题时就会发生这种情况。 :-)
Problem solved. The span tag was the issue; wrapping the Gravity Form in a div tag works perfectly.
This is what happens when you overthink a problem. :-)