Vote count:
0
I want to make a navigation bar that i can hide and unhide with javascript. I know this should work from jsfiddle (http://ift.tt/1rEtFjx). Any help would be great thanks. I know it's something basic i've done wrong. Thanks for any help.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hide the Navigation</title>
<style>
.hidding{
display: none;
}
</style>
</head>
<body>
<nav>
<ul>
<a href="#"></a><li>Home</li></a>
<a href="#"></a><li>Contents</li></a>
<a href="#"></a><li>Social Media</li></a>
</ul>
<div class="handle">Menu</div>
</nav>
<script>
$('.handle').on('click', function(){
$('nav ul').toggleClass('hidding');
});
</script>
</body>
</html>
asked 41 secs ago
I want to make a navigation bar that i can hide and unhide with javascript
Aucun commentaire:
Enregistrer un commentaire