謝謝你試圖提前幫助!twitter引導下拉菜單不工作在Django模板
我的問題是,twitter引導程序的下拉菜單(對於導航欄)不適用於我,我現在很迷路。 我的頭碼(所以是的,我也有自己的.js和稱呼它):
<head>
<title>{% block title %}User test{% endblock %}</title>
<!--for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js"></script><!--dropdown addon-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><!--jquery-->
<script type="text/javascript">
$(document).ready(function(){
$('.dropdown-toggle').dropdown();
});
</script>
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}style.css" /><!--link to my style.css-->
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" /><!--link to bootstrap's css-->
即是假設有下拉菜單項:再次
<ul class="nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
{% trans "Logged in" %}: {{ user.username }}
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="{% url auth_password_change %}">{% trans "Change password" %}</a></li>
<li><a href="{% url auth_logout %}">{% trans "Log out" %}</a></li>
</ul>
</li>
<li><a href="/upload/">{{ "Upload your CVS" }}</a></li>
<li><a href="/settings/">{% trans "Settings" %}</a></li>
</ul>
謝謝,
blargie-bla
謝謝,但它仍然無法正常工作:/但謝謝! – 2012-02-16 09:22:27