Skip to content
Snippets Groups Projects
Verified Commit e19a3afb authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

Fix sidenav not showing

parent c282c287
No related branches found
No related tags found
No related merge requests found
......@@ -68,26 +68,29 @@
</div>
</nav>
<script>
$("#o-nas").click(function() {
var body = $("body");
body.removeClass("show-subnav2");
if(body.hasClass("show-subnav1"))
body.removeClass("show-subnav1");
else
body.addClass("show-subnav1")
});
$("#clanky").click(function() {
var body = $("body");
body.removeClass("show-subnav1");
if(body.hasClass("show-subnav2"))
$(document).ready(function() {
$(".menu-icon").sideNav();
$("#o-nas").click(function() {
var body = $("body");
body.removeClass("show-subnav2");
else
body.addClass("show-subnav2")
});
$("body").click(function(e) {
if(!($(e.target).parents("a").length || $(e.target).is("a"))) {
$("body").removeClass("show-subnav2").removeClass("show-subnav1");
}
if(body.hasClass("show-subnav1"))
body.removeClass("show-subnav1");
else
body.addClass("show-subnav1")
});
$("#clanky").click(function() {
var body = $("body");
body.removeClass("show-subnav1");
if(body.hasClass("show-subnav2"))
body.removeClass("show-subnav2");
else
body.addClass("show-subnav2")
});
$("body").click(function(e) {
if(!($(e.target).parents("a").length || $(e.target).is("a"))) {
$("body").removeClass("show-subnav2").removeClass("show-subnav1");
}
});
});
</script>
<!-- Side nav -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment