在弹出式显示和隐藏上遇到样式问题
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");
});
下面的 ref 代码在小提琴中工作正常,但不适用于我的代码
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");
});
弹
窗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");
});
琴师
请参阅此链接有关引导弹出框的信息
相关文章:
- 当包含另一个asp文件时,是否也包含所有引用的样式和脚本页面
- 将PHP变量传递给jQuery时遇到问题
- 将样式表插入iframe
- 我的jQuery插件参数没有正确启动,遇到了问题
- 跟踪在页面加载时应用内联样式的JavaScript
- 如果文本字段为空,则使用JavaScript应用CSS样式
- 定义完全独立的样式信息
- W3C循环样式的JavaScript
- jQuery/JavaScript在线公文包表单-打印样式表
- 使用递归、Ramda.js和无点样式重构字符串的getPermutations()
- FF和Chromium中CSS样式按钮的外观差异
- 如何首先设置样式<td>表中包含在窗体中的元素
- javascript问题正文样式
- 使用具有内联样式的tidy-html5
- DataTables-创建自定义分页样式(加载更多样式)
- 具有所有样式的文本正在复制到可编辑文本区域
- 如何提供在javascript中编写对对象的重复访问以设置元素样式的简写
- 绑定Range输入以修改样式
- 一个正则表达式,用于从JS中的HTML标记中删除id、样式和类属性
- 在弹出式显示和隐藏上遇到样式问题