Bootstrap下拉列表不起作用?

时间:2013-04-15 16:14:11

标签: twitter-bootstrap drop-down-menu

我有一个小问题,引导下拉功能将不再起作用。这是我的代码:

    // HEAD

<script type="text/javascript" src="<?php echo osc_current_web_theme_js_url('jquery.js') ; ?>"></script>
<script type="text/javascript" src="<?php echo osc_current_web_theme_js_url('jquery-ui.js') ; ?>"></script>
<script type="text/javascript" src="<?php echo osc_current_web_theme_js_url('jquery-latest.js') ; ?>"></script>
<script type="text/javascript" src="<?php echo osc_current_web_theme_js_url('jquery.tablesorter.js') ; ?>"></script>
<script type="text/javascript" src="<?php echo osc_current_web_theme_js_url('jquery.uniform.js') ; ?>"></script>
<script tyle="text/javascript" src="<?php echo osc_current_web_theme_js_url('bootstrap.min.js') ; ?>"></script>
<script tyle="text/javascript" src="<?php echo osc_current_web_theme_js_url('bootstrap-dropdown.js') ; ?>"></script>


// DROPDOWN BUTTON

<a class="btn btn-danger dropdown-toggle" data-toggle="dropdown" href="#">
    <i class="icon-minus-sign"></i> Anmeld annonce
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu">
    <li><a id="item_spam" href="<?php echo osc_item_link_spam() ; ?>" rel="nofollow"><?php _e('spam', 'modern') ; ?></a></li>
                            <li><a id="item_bad_category" href="<?php echo osc_item_link_bad_category() ; ?>" rel="nofollow"><?php _e('misplaceret', 'modern') ; ?></a></li>
                            <li><a id="item_repeated" href="<?php echo osc_item_link_repeated() ; ?>" rel="nofollow"><?php _e('kopiret', 'modern') ; ?></a></li>
                            <li><a id="item_expired" href="<?php echo osc_item_link_expired() ; ?>" rel="nofollow"><?php _e('udgået', 'modern') ; ?></a></li>
                            <li><a id="item_offensive" href="<?php echo osc_item_link_offensive() ; ?>" rel="nofollow"><?php _e('stødende', 'modern') ; ?></a></li>

  </ul>

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

试试这个,不要忘记添加bootstrap css和js。

<div class="container">    
   <div class="dropdown">
      <a class="btn btn-danger dropdown-toggle" id="dLabel" data-toggle="dropdown" data-target="#">
        <i class="icon-minus-sign"></i> Anmeld annonce
        <span class="caret"></span>
      </a>
      <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
        <li><a id="item_spam" href="<?php echo osc_item_link_spam() ; ?>" rel="nofollow">Your php</a></li>
        <li><a id="item_bad_category" href="<?php echo osc_item_link_bad_category() ; ?>" rel="nofollow">Yt-stats.com</a></li>
        <li><a id="item_repeated" href="<?php echo osc_item_link_repeated() ; ?>" rel="nofollow">Be cool</a></li>
        <li><a id="item_expired" href="<?php echo osc_item_link_expired() ; ?>" rel="nofollow">and</a></li>
        <li><a id="item_offensive" href="<?php echo osc_item_link_offensive() ; ?>" rel="nofollow">Enjoy</a></li>

      </ul>
    </div>
</div>
祝你好运;)