I've created a Docpad site using the Twitter Bootstrap skeleton. I cannot get either Bootstrap's tabbable tabs or drop-down menus to work. They render, but do not function. From research on Stackoverflow it appears that additional jquery needs to be included for these Bootstrap functions. I've tried to add it in to Docpad but have been unsuccessful. Has anyone gotten these Bootstrap functions to work in Docpad?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
for Boostrap, to run drop-down menu i know its need this code in a page to work:
$('.dropdown-toggle').dropdown();
this call a bootstrap plugin.
the sequence call for js files is:
<script src="jquery.js"></script>
<script src="bootstrap.js"></script>
<script type="text/javascript"> $(document).ready(function () { $('.dropdown-toggle').dropdown(); }); </script>
Its important to call jquery and bootstrap js before others js codes
For tabs i dont know because i didnt use until now.