Cannot get Metro UI navigation bar dropdown to work
I'm having trouble getting the navigation bar to work. I'm using Jquery ver 2.1.1. I've validated that jquery is working (added a little alert for window load). The navigation bar itself is rendering, but the dropdown just does not work. I'm using Visual Studio and installed the package via nuget.
JS Files included: metro.min.js jquery-2.1.1.js
CSS Files: metro-bootstrap.css metro-bootstrap-responsive.css
Please help.
<li> <a class="dropdown-toggle" href="#">Products</a> <ul class="dropdown-menu" data-role="dropdown"> <li><a href="#">Windows 8</a></li> <li><a href="#">Skype</a></li> <li><a href="#">Internet Explorer</a></li> <li><a href="#">Office</a></li> </ul> </li>
Sergey, Thanks for the response. I was not specific enough on my question. I have the template working for the most part, its only the dropdown that does not show up. I have the HTML snippet you shared included on the nav bar, but on the mouse over or click the drop down menu does not show. Please look at http://photoburst-dev.azurewebsites.net/ as an example of the problem I describe. I have your HTML snippet on the menu, but the drop down still does not show.
I also have this problem. I have copied the code from the docs into my html. Strange thing is that the examples in docs folder works fine, but even if I include the same minified js, still doesn't work. Any thought?
Well, the dilema it's solved. In the docs examples, there is a function called "reinit" in docs.js file. This function calls $.Metro.initDropdowns(). If I comment this, the examples also stop working. As a workaround, I added this call in my page and it works. I'm not sure this is a bug or it's just the way it should be...
Thanks @ratones . I need to give it a try.
am having the same problem. drop downs dont work and the navbar dropdown on small view port is not working too. files added are
<script src="js/docs.js"></script>
<script src="min/metro.min.js"></script>
Same problem. The code in docs dosen't work !
I once uncounted the same problem and this is how i solved it. From the docs folder after you have download the package, maintain the main folder directory( js,css,fonts) and use the structure in this example " template-any.html "... It will work jux fine. http://afrawoma.a78.org is ma current site am working on.
please read this http://metroui.org.ua/requirements.html
Hey, thanks for the response. I used this order but still coudn't get through this. :/
<link rel="stylesheet" href="css/metro-bootstrap.css" >
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/metro-bootstrap-responsive.css">
<link rel="stylesheet" href="min/iconFont.min.css" >
<link rel="stylesheet" href="css/docs.css" >
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/jquery.widget.min.js"></script>
<script src="js/jquery.mousewheel.js"></script>
<script src="min/metro.min.js"></script>
Do you have a sample page to look at?
Sample page please
How can the tiles be made responsive
--- Original Message ---
From: "Sergey Pimenov" [email protected] Sent: October 3, 2014 12:06 PM To: "olton/Metro-UI-CSS" [email protected] Cc: "bruno4eva" [email protected] Subject: Re: [Metro-UI-CSS] Cannot get Metro UI navigation bar dropdown to work (#574)
please read this http://metroui.org.ua/requirements.html
Reply to this email directly or view it on GitHub: https://github.com/olton/Metro-UI-CSS/issues/574#issuecomment-57785313
No idea why Drop-down is not working.
I included
script('js/jquery-2.1.1.min.js') script('js/jquery-ui.min.js') script('/js/jquery.widget.min.js')
style('css/jquery-ui.css') style('css/jquery-ui.theme.css')
style('css/metro-bootstrap.min.css') style('css/metro-bootstrap-responsive.min.css') style('css/iconFont.min.css') script('/js/metro.min.js') script('/js/metro-calendar.js') script('/js/metro-datepicker.js') script('/js/metro-dropdown.js')
metro.min.js includes all js metro components. Check your main container for class metro. If your build dropdown from ajax, set global variable METRO_AUTO_REINIT to true
Yes, my Body tag have metro class. Also should I comment-out metro-dropdown.js now?
body class="metro
div class="container" .... ....
nav class="sidebar dark"
- Summary
<li class="stick bg-grey">
<a class="dropdown-toggle" href="#"><i class="icon-tree-view"></i>Project</a>
<ul class="dropdown-menu" data-role="dropdown">
<li><a href>(Report-1)</a></li>
<li><a href>(Report-2)</a></li>
</ul>
</li>
</ul>
/nav
... ....
js debug please
Hi no error on console.
In short it is not toggling. It should do "style="display: block;" and "style="display: none;"
So I think the fact is, it is not able to apply JS to that element which is