admin管理员组文章数量:1391850
I'm using modal and dropbox js of twitter bootstrap in my project and having problem using the two.
I have added the following script tags in my html -
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-dropdown.js"></script>
Now, if I keep both tags, dropdown js does not work but if I remove the first one, dropdown works but I cannot use modal. Is adding a separate js for modal dialog i.e bootstrap-modal.js
is the only solution or am I missing something here?
I'm using modal and dropbox js of twitter bootstrap in my project and having problem using the two.
I have added the following script tags in my html -
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-dropdown.js"></script>
Now, if I keep both tags, dropdown js does not work but if I remove the first one, dropdown works but I cannot use modal. Is adding a separate js for modal dialog i.e bootstrap-modal.js
is the only solution or am I missing something here?
- 1 Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. you do not need the dropdown.js if you include bootstrap.min.js – G-Man Commented May 24, 2013 at 3:42
- 2 You can also make a custom bootstrap[.min].js file, with only the necessary plugins. – Qantas 94 Heavy Commented May 24, 2013 at 3:43
2 Answers
Reset to default 6Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. you do not need the bootstrap-dropdown.js if you include bootstrap.min.js
From the bootstrap page http://twitter.github.io/bootstrap/javascript.html
Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. you do not need the bootstrap-dropdown.js if you include bootstrap.min.js. I also face the same problem sometimes. Sometime its difficult to predict the behavior of scripts with twitter bootstrap. Like there is plugin for dropdown in bootstrap.js but still not working. if you include separate dropdown.js then there is no issue
本文标签: javascriptUnable to use bootstrapminjs and bootstrapdropdownjs at the same timeStack Overflow
版权声明:本文标题:javascript - Unable to use bootstrap.min.js and bootstrap-dropdown.js at the same time - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744766936a2624098.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论