drop down menu - CSS Dropdown Glitchy -
the dropdown works when rollover top buttons when try move down dropdown menu disappears.
the problem fact using hover make dropdown appear. if user doesn't hover on menu item right, dropdown won't show/disappear. not mention won't work on mobile devices.
the solution use jquery, since having jquery(1.8.3) being loaded.
i won't write whole menu because need learn. however, i'll give enough started. here important aspects...
.dropdown li ul { display:none; } .show-dropdown li ul { display:block; } <script type="text/javascript"> $(document).ready(function(){ $("#menu-top").click(function () { $(this).toggleclass("dropdown show-dropdown"); }); }); </script>
remove link tags menu items dropdowns.
here working fiddle: http://jsfiddle.net/grkbm/
Comments
Post a Comment