Bootstrap drop-down menus and tabbable tabs on Doc

2019-03-04 02:27发布

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条回答
Summer. ? 凉城
2楼-- · 2019-03-04 03:07

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:

  1. <script src="jquery.js"></script>
  2. <script src="bootstrap.js"></script>
  3. <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.

查看更多
登录 后发表回答