弹出窗口显示和隐藏的样式有问题
having issue with styling on popover show and hide
html
<a class="popper btn" rel="popover" data-toggle="popover"><h3 class="gv layout">Layout Plan</h3> </a>
<div class="popper-content hide">
<a href="pdf/layout1.pdf" target="_blank"><img src="images/layout1.jpg" class="btn"/></a>
<a href="pdf/layout2.pdf" target="_blank"><img src="images/layout2.jpg" class="btn"/></a>
<a href="pdf/layout3.pdf" target="_blank"><img src="images/layout3.jpg" class="btn"/></a>
</div>
脚本:
$('.popper').popover({
placement: 'bottom',
container: 'body',
html: true,
content: function () {
return $(this).next('.popper-content').html();
}
});
我希望它在弹出窗口显示时执行,在此先感谢 任何人都可以找到这里的问题,
脚本:
$popover.on("show", function(e) {
$("#transbg").css("padding-bottom","2600px");
});
下面的参考代码在 fiddle 中工作正常,但不适用于我的代码
var $popover = $(".poper").popover({
trigger: "click"
}).click(function(e) {
e.$("#transbg").css("padding-bottom","260px");
});
$popover.on("hide", function(e) {
$("#transbg").css("padding-bottom","50px");
});
popover show
事件语法不正确,可以试试下面的
HTML
<a class="poper btn" rel="popover" data-toggle="popover">
<h3 class="gv layout">
Layout Plan</h3>
</a>
<div class="popper-content hide">
html
</div>
JS
var abc = $('.poper').popover({
placement: 'bottom',
container: 'body',
trigger: 'hover',
html: true,
content: function () {
return $(this).next('.popper-content').html();
}
});
abc.on("shown.bs.popover", function (e) {
console.log("popover shown");
});
abc.on("hidden.bs.popover", function (e) {
console.log("popover hidden");
});
关于 bootstrap 弹出框
请参考 this link
html
<a class="popper btn" rel="popover" data-toggle="popover"><h3 class="gv layout">Layout Plan</h3> </a>
<div class="popper-content hide">
<a href="pdf/layout1.pdf" target="_blank"><img src="images/layout1.jpg" class="btn"/></a>
<a href="pdf/layout2.pdf" target="_blank"><img src="images/layout2.jpg" class="btn"/></a>
<a href="pdf/layout3.pdf" target="_blank"><img src="images/layout3.jpg" class="btn"/></a>
</div>
脚本:
$('.popper').popover({
placement: 'bottom',
container: 'body',
html: true,
content: function () {
return $(this).next('.popper-content').html();
}
});
我希望它在弹出窗口显示时执行,在此先感谢 任何人都可以找到这里的问题,
脚本:
$popover.on("show", function(e) {
$("#transbg").css("padding-bottom","2600px");
});
下面的参考代码在 fiddle 中工作正常,但不适用于我的代码
var $popover = $(".poper").popover({
trigger: "click"
}).click(function(e) {
e.$("#transbg").css("padding-bottom","260px");
});
$popover.on("hide", function(e) {
$("#transbg").css("padding-bottom","50px");
});
popover show
事件语法不正确,可以试试下面的
HTML
<a class="poper btn" rel="popover" data-toggle="popover">
<h3 class="gv layout">
Layout Plan</h3>
</a>
<div class="popper-content hide">
html
</div>
JS
var abc = $('.poper').popover({
placement: 'bottom',
container: 'body',
trigger: 'hover',
html: true,
content: function () {
return $(this).next('.popper-content').html();
}
});
abc.on("shown.bs.popover", function (e) {
console.log("popover shown");
});
abc.on("hidden.bs.popover", function (e) {
console.log("popover hidden");
});
关于 bootstrap 弹出框
请参考 this link