Bootstrap drop-down menus and tabbable tabs on Docpad

牧云@^-^@ 提交于 2019-12-31 06:26:29

问题


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:

  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.



来源:https://stackoverflow.com/questions/17984224/bootstrap-drop-down-menus-and-tabbable-tabs-on-docpad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!