大佬教程收集整理的这篇文章主要介绍了jQuery工具提示onClick?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_301_2@使用工具提示的想法是,我有一些链接,我想@L_616_9@@L_197_1@.虽然正常的工具提示(这可能是我出错的地方..)是悬停,它需要是一个通过点击切换的链接触发它.
@H_301_2@有没有比使用工具提示更好的想法?
events: { def: "mouseenter,mouSELEave",// default show/hide events for an element input: "focus,blur",// for all input elements widget: "focus mouseenter,blur mouSELEave",// SELEct,checkBox,radio,button tooltip: "mouseenter,mouSELEave" // the tooltip element }@H_301_2@使用’click’应该可以解决问题. (我没有测试过) @H_301_2@但是,如果所有其他方法都失败了,你仍然可以使用’scripTing api’伪造它,只需调用.show()和.hide()
@H_301_2@编辑:
@H_301_2@由于点击,点击不能完全按照我的想法工作,我给你一个解决方法.
var tooltip = $("#dyna img[title]").tooltip({ events: { def: ",",// default show/hide events for an element tooltip: "click,mouSELEave" // the tooltip element },// tweak the position offset: [10,2],// use the "slide" effect effect: 'slide' // add dynamic plugin with optional configuration for bottom edge }).dynamic({ bottom: { direction: 'down',bounce: true } }); tooltip.click(function() { var tip = $(this).data("tooltip"); if (tip.isShown(true)) tip.hide(); else tip.show(); });@H_301_2@但我建议您按照user834754的建议查看qTip,您可能会更喜欢它.
以上是大佬教程为你收集整理的jQuery工具提示onClick?全部内容,希望文章能够帮你解决jQuery工具提示onClick?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。