jQuery   发布时间:2022-04-19  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了jQuery工具提示onClick?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我一直在寻找很长一段时间,似乎无法找到一个利用以下@L_197_1@的jQuery工具提示插件: @H_301_2@onClick(而不是悬停,使其像切换按钮一样工作)
淡入淡出

@H_301_2@使用工具提示的想法是,我有一些链接,我想@L_616_9@@L_197_1@.然正常的工具提示(这可能是我出错的地方..)是悬停,它需要是一个通过点击切换的链接触发它.

@H_301_2@有没有比使用工具提示更好的想法?

解决方法

我不知道你是怎么看的,但快速谷歌搜索 jquery工具提示给了我
http://flowplayer.org/tools/tooltip/index.html(现在已经使用他们的可滚动插件一段时间了,真的很喜欢:) @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@由于点击,点击不能完全按照我的想法工作,我给你一个解决方法.
我真的希望有更好的方法来实现相同的结果.
我用http://flowplayer.org/tools/tooltip/index.html的本地副本测试了它,它按预期工作.

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,请注明来意。