【发布时间】:2015-02-07 14:12:03
【问题描述】:
我正在尝试为我正在开发的网站(Magento 版本 1.9.1.0)设置 bootstrap-select.js,但我遇到了一些我无法解决的问题。
一切都完美加载,但是当我在下拉选择列表中选择一个选项时,整个选择会通过在其上添加 element.style 而消失,如下所示:
style="display:none;"
在 FireBug 中它说:
element.style {
display: none;
}
在此处查看视觉图像:http://i.imgur.com/cg1jkOp.jpg?1
问题是我不知道这个样式是从哪里来的,所以我决定在 FireBug 中检查“Break on attribute change”,看看它说了什么。代码来自 Jquery (jquery-2.1.3.min.js),如图所示:http://i.imgur.com/Jbu8TCx.jpg?1
这是我在<head> 部分的内容:
<link rel="stylesheet" href="http://localhost/sg-magento/skin/frontend/ultimo/default/css/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="http://localhost/sg-magento/skin/frontend/ultimo/default/css/bootstrap/bootstrap-select.min.css">
<script type="text/javascript" src="http://localhost/sg-magento/js/infortis/jquery/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="http://localhost/sg-magento/skin/frontend/ultimo/default/js/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="http://localhost/sg-magento/skin/frontend/ultimo/default/js/bootstrap/bootstrap-select.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.selectpicker').selectpicker();
});
</script>
我从这里去哪里?我该如何解决这个问题?看似很小的事情,但现在真的让我很紧张。想了很久。
希望有人愿意帮忙。
谢谢。
【问题讨论】:
标签: javascript jquery twitter-bootstrap magento magento-1.9