javascript - Twitter Bootstrap top menu unknown component slides down -
i'm using twitter bootstrap , i'm having problem top-bar menu. when choose item dropdowns, events fired correctly, javascript ok, there visual (a div
probably?) slides down , disappears. looks this:
i'm not twitter bootstrap expert, expect i've got invalid html put there. entire html code available here: https://github.com/pateketrueke/json-schema-faker/blob/gh-pages/src/index.html, important part this:
<body> <!-- fixed navbar --> <nav class="navbar navbar-default navbar-fixed-top"> <div class="container"> [...] <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">samples <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <li class="dropdown-header">faker.js</li> <li><a href="#" id="example_faker" data-toggle="collapse" data-target=".navbar-collapse">faker example</a></li> <li class="divider"></li> <li class="dropdown-header">chance.js</li> <li><a href="#" id="example_chance" data-toggle="collapse" data-target=".navbar-collapse">chance example</a></li> <li class="divider"></li> <li class="dropdown-header">other</li> <li><a href="#" id="example_boolean" data-toggle="collapse" data-target=".navbar-collapse">boolean</a></li> <li><a href="#" id="example_integer" data-toggle="collapse" data-target=".navbar-collapse">integer</a></li> <li><a href="#" id="example_array" data-toggle="collapse" data-target=".navbar-collapse">array</a></li> </ul> </li>
- twitter bootstrap version v3.3.4 (from bower.json).
- the code of page kept here: https://github.com/pateketrueke/json-schema-faker/tree/gh-pages.
- the site available online at: http://json-schema-faker.js.org/. try click "samples" in top-bar menu , choose option see strange thing sliding down , disappearing afterwards...
the question is: can remove "sliding-down-and-disappearing-thing" bug?
edit
this app supports mobile version well. looks this:
when touch top right hand nav button, menu appears:
now when click samples, submenu appears:
and when click of options, menus hide (collapse), see demo immediately.
now mobile works intended :). , i'd non-mobile-sliding-bug solution not ot break mobile version.
<div id="navbar" class="navbar-collapse collapse">
remove 2 css classes.
this 2 classes supposed works dropdown system. dropdown system try weird div , doesn't works.
Comments
Post a Comment