引导中的javascript和jquery脚本标记

引导中的javascript和jquery脚本标记,javascript,django,twitter-bootstrap,Javascript,Django,Twitter Bootstrap,我的引导有点问题。我开始遇到组件中链接不可点击的问题。当在浏览器中键入链接时,这些链接是正常的,但单击时却不正常 我重新排列了正文底部脚本标记的顺序,这样Django静态目录中jQuery的链接首先出现,链接变得“可点击”,尽管它破坏了菜单下拉菜单和手风琴等其他功能,不再打开 我尝试将脚本标记移动到部分中,并将它们切换回来;尝试了jQuery的开发版本。。。。似乎什么都不管用 发生什么事了?如何使链接处于活动状态并使javascript功能正常工作 <head>

我的引导有点问题。我开始遇到组件中链接不可点击的问题。当在浏览器中键入链接时,这些链接是正常的,但单击时却不正常

我重新排列了正文底部脚本标记的顺序,这样Django静态目录中jQuery的链接首先出现,链接变得“可点击”,尽管它破坏了菜单下拉菜单和手风琴等其他功能,不再打开

我尝试将脚本标记移动到部分中,并将它们切换回来;尝试了jQuery的开发版本。。。。似乎什么都不管用

发生什么事了?如何使链接处于活动状态并使javascript功能正常工作

  <head>
        {% block head %}
        # ...
        # ...

        {% load static %}

            <link href="{% static 'css/bootstrap.css' %}" rel="stylesheet">
            <link href="{% static 'css/custom.css' %}" rel="stylesheet">

            <style type="text/css">
              body {
                padding-top: 60px;
                padding-bottom: 40px;
              }
            </style>
            <link href="{% static 'css/bootstrap-responsive.css' %}" rel="stylesheet">
        {% endblock head %}

   </head>

   <body id="body">
          {% block body %} 

           #.....
           #.....

            <!-- Le javascript
            ================================================== -->
            <!-- Placed at the end of the document so the pages load faster -->

            <script src="{% static 'js/jquery-1.8.2.min.js' %}"></script>
            <script src="{% static 'js/bootstrap.min.js' %}"></script>


          {% endblock body %}  
  </body>

{%block head%}
# ...
# ...
{%load static%}
身体{
填充顶部:60px;
填充底部:40px;
}
{%endblock头%}
{%block body%}
#.....
#.....
{%endblock body%}

在进行了大量搜索和下巴抚摸之后,我意识到,在我从视图中调用的模板中,我有以下内容:

  {% for group in class_groups %}
    <li><a data-toggle=**"tab"** href="{% url 'subnav' sub_slug=subj class_grp_slug=group.group_name %}">{{ group.group_name }}</a>
  {% endfor %}
{%for class_groups%}
  • {%endfor%}
  • 实际上应该是:

      {% for group in class_groups %}
        <li><a data-toggle=**"tabs"** href="{% url 'subnav' sub_slug=subj class_grp_slug=group.group_name %}">{{ group.group_name }}</a>
      {% endfor %}
    
    {%for class_groups%}
    
  • {%endfor%}

  • 下拉菜单和导航选项卡现在都在工作

    你不需要在这些URL周围加引号吗?我现在在标记内的路径上加了引号和单引号,但仍然不起作用。