Docpad上的Bootstrap下拉菜单和可选项卡 [英] Bootstrap drop-down menus and tabbable tabs on Docpad

查看:98
本文介绍了Docpad上的Bootstrap下拉菜单和可选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Twitter Bootstrap框架创建了Docpad网站.我无法使Bootstrap的Tabbable标签或下拉菜单正常工作.它们呈现但不起作用.从对Stackoverflow的研究来看,似乎需要为这些Bootstrap函数包括其他jquery.我尝试将其添加到Docpad中,但未成功.有没有人获得这些Bootstrap函数以在Docpad中工作?

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?

推荐答案

对于Boostrap,要运行下拉菜单,我知道它需要页面中的以下代码才能起作用:

for Boostrap, to run drop-down menu i know its need this code in a page to work:

 $('.dropdown-toggle').dropdown();

这称为引导程序插件.

js文件的顺序调用是:

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>
  1. <script src="jquery.js"></script>
  2. <script src="bootstrap.js"></script>
  3. <script type="text/javascript"> $(document).ready(function () { $('.dropdown-toggle').dropdown(); }); </script>

在其他js代码之前调用jQuery和bootstrap js很重要

Its important to call jquery and bootstrap js before others js codes

对于标签,我不知道,因为我直到现在才用过.

For tabs i dont know because i didnt use until now.

这篇关于Docpad上的Bootstrap下拉菜单和可选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆