最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

BootStrap使用popover插件實現(xiàn)鼠標經(jīng)過顯示并保持顯示框

 更新時間:2016年06月23日 11:27:32   作者:Geomen  
這篇文章主要介紹了BootStrap使用popover插件實現(xiàn)鼠標經(jīng)過顯示并保持顯示框的相關(guān)資料,非常不錯,具有參考借鑒價值,需要的朋友可以參考下

在商城里,導航欄的購物車展示經(jīng)常需要鼠標經(jīng)過時,顯示已經(jīng)放入購物車的商品,bootstrap是沒有直接用的插件的,這個時候就可以使用popover這個插件改造后實現(xiàn),具體如下:

實現(xiàn)效果圖:

html實現(xiàn):

<a href="#" rel="drevil">
<span class="glyphicon glyphicon-shopping-cart"> </span> 購物車
</a>

javascript實現(xiàn):

$(function(){
$("[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")
}
}, 100);
});
});

以上所述是小編給大家介紹的BootStrap使用popover插件實現(xiàn)鼠標經(jīng)過顯示并保持顯示框,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評論

潍坊市| 高安市| 抚远县| 宝兴县| 岚皋县| 青龙| 庐江县| 广灵县| 靖宇县| 苏尼特右旗| 鄂托克旗| 郧西县| 德州市| 海宁市| 隆化县| 伊吾县| 通山县| 嘉善县| 安新县| 会泽县| 浠水县| 东宁县| 峨眉山市| 荥阳市| 怀仁县| 仪陇县| 武义县| 琼结县| 封开县| 临城县| 新密市| 美姑县| 图片| 北碚区| 武邑县| 昌图县| 儋州市| 台东市| 卢湾区| 都江堰市| 正宁县|