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

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

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

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

實(shí)現(xiàn)效果圖:

html實(shí)現(xiàn):

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

javascript實(shí)現(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插件實(shí)現(xiàn)鼠標(biāo)經(jīng)過顯示并保持顯示框,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時(shí)回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評論

柘荣县| 奉化市| 连城县| 炎陵县| 南郑县| 翁牛特旗| 阿坝县| 舒城县| 长岭县| 元朗区| 蓝山县| 苍溪县| 二连浩特市| 岳阳县| 唐海县| 枞阳县| 雷山县| 古丈县| 宁强县| 松潘县| 乳山市| 珠海市| 巴中市| 阿城市| 桐城市| 贞丰县| 维西| 平遥县| 子洲县| 齐齐哈尔市| 秦安县| 钟山县| 龙口市| 武穴市| 鄂托克前旗| 永春县| 钟山县| 教育| 年辖:市辖区| 德州市| 嵩明县|