Created
March 13, 2018 04:31
-
-
Save omermindivanli/b4deb59d001d5155e2221a943a0ef8d1 to your computer and use it in GitHub Desktop.
In Client-Side Rendering React, When you click to Bootstrap Navbar, it does not collapse. Here is the solutiıon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
//In Client-Side Redering React, Bootstrap | |
//Navbar not collapsing problem | |
$(function () { | |
var navMain = $('.navbar-collapse'); | |
navMain.on('click', 'a', null, function () { | |
navMain.collapse('hide'); | |
$("html, body").scrollTop({ scrollTop: 0 }, "slow"); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment