bootstrap如何设置鼠标悬停提示

发布时间:2022-05-19 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了bootstrap如何设置鼠标悬停提示脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

bootstrap如何设置鼠标悬停提示

1、     

<button tyPE="button" rel="drevil" data-content="报名截止时间:&#39;+time+'" data-container="body" data-toggle="popover" 
data-placement="bottom"></button>

2、

$(function () { $("[data-toggle='popover']").popover(); });    
    $("[rel=drevil]").popover({
                      trigger:';manual',
                      //placement : 'bottom', //placement of the popover. also can use top, bottom, 
                      left or right
                      //天tITle : '<div style="text-align:center; color:red; text-decoration:underline; 
                      font-Size:14px;"> Muah ha ha</div>', //this is the top title bar of the popover. 
                      add some basic css
                      htML: 'true', //needed to show html of course
                      //content : '<div id="popOverBox"><img src="http://www.hd-report.COM/wp-content
                      /uploads/2008/08/mr-evil.jpg" width="251" height="201" /></div>', //this is the 
                      content of the html box. add the image here or anything you want really.
                      animation: false
                  }).on("mouseenter", function () {
                      VAR _this = this;
                      $(this).popover("show");
                      $(this).siblings(".popover").on("mouseleave", function () {
                          $(_this).popover('hide');
                      });
                  }).on("mouseleave", function () {
                      var _this = this;
                      setTimeout(function () {
                          if (!$(".popover:hover").length) {
                              $(_this).popover("hide")
                          }
                      }, 300);
                  });

相关推荐:《bootstrap入门教程》

以上就是bootstrap如何设置鼠标悬停提示的详细内容,更多请关注脚本宝典其它相关文章

脚本宝典总结

以上是脚本宝典为你收集整理的bootstrap如何设置鼠标悬停提示全部内容,希望文章能够帮你解决bootstrap如何设置鼠标悬停提示所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:设置设置