javascript - Bootstrap 3 after navbar collapse, toggle wont reopen nav -
i trying solve issue when clicked on navbar menu item in mobile view navbar remained expanded. didn't work me menu item pointing div id. read here of solution add together below href tag.
data-toggle="collapse" data-target=".navbar-collapse"
this did not work me work using javascript prepare found on github https://github.com/twbs/bootstrap/issues/12852
$(document).on('click','.navbar-collapse.in',function(e) { if( $(e.target).is('a') ) { $(this).collapse('hide'); } });
now problem after navbar hidden not open sec time.
anyone else have problem or solution?
change collapse parameter hide
toggle
.
$(this).collapse('toggle');
see more @ bootstrap docs.
javascript jquery twitter-bootstrap
No comments:
Post a Comment