9👍
The problem was in missing js block in html file, required for a specific feature.
The missing code bit was:
$('.dropdown-toggle').dropdown()
4👍
You’re not properly binding your main nav link to your dropdown, try this:
<ul class="nav">
<li class="dropdown" id="fat-menu"> /* notice the reference to your dropdown link #fat-menu */
<a href="#fat-menu" class="dropdown-toggle" data-toggle="dropdown">
Аккаунт
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a>SubLink</a></li>
<li class="divider"></li>
<li><a>SubLink</a></li>
</ul>
</li>
</ul>
- [Django]-Django South vs Migratory
- [Django]-Populate CheckboxSelectMultiple with existing data from django model form
- [Django]-Django admin with websocket
- [Django]-ManagementForm data missing error while formset validation
2👍
I usually used to forget of one of these:
- proper html
- linking to jquery.js and bootstrap-dropdown.js
- checking if i linked it properly (it seems redundant but it certainly helped me)
- calling the dropdown: $(‘.dropdown-toggle’).dropdown()
- [Django]-How to use Apache to serve Django server and React client?
- [Django]-Serve static files with Django both from CDN and local directories
- [Django]-Assigning a proxy model instance to foreign key
- [Django]-Custom authentication with django?
1👍
I know this may seem silly, but when you view the source (via right-click), are the addresses of the JavaScript files correct? It’s possible that {{ STATIC_URL }} isn’t correct. Try copy and pasting the addresses from the source into the address bar. Make sure you actually see the content of the JavaScript files.
- [Django]-Fabric: unable to get environment variables within virtualenv
- [Django]-Django Rest Framework IsAuthenticated permission Error Anonymous user
- [Django]-Checkboxes and Radio buttons in Django ModelForm
- [Django]-Django cors headers and server error
1👍
I was facing the same problem. Commenting the link for bootstrap-dropdown.js resolved it. I only needed bootstrap.min.js
- [Django]-How to join multiple params dynamically for django Q object
- [Django]-Serving many on-the-fly generated images with Django
- [Django]-How to use date__range filter efficiently in django
0👍
That will happen if you override li somewhere in your css. For example, if you have an other stylesheet with content:
li {
list-style: none;
margin-bottom: 20px;
overflow: hidden;
padding-bottom: 25px;
position: relative;
}
It will not work. Make sure there is no conflict.
- [Django]-Django [Mezzanine CMS] project not deploying to Heroku
- [Django]-Why django contains a lot of '__init__.py'?
- [Django]-How to pull information saved from IP address call with GeoIP2() django models to display in my html
-3👍
Had the same issue on a .net project (drop down menu not showing at all), however offcial bootstrap samples worked fine. Upgrading jQuery library on my project from 1.6.1 to 1.8.2 solved the problem.