Im trying to make simple button to show and hide menu when screen is smaller than 35em. But the issue is that my jQuery click event doesnt change display value for my list items.
CSS:
div{
list-style:none;
width:100%;
text-align:center;
}
ul li{
display:inline-block;
}
#menuToggle {
display:none;
}
@media screen and (max-width: 35em) {
#menuToggle {
display:block;
cursor:pointer;
}
ul li{
display:none;
}
}
jQuery:
$('#menuToggle').click(function(){
$('ul li').css('display','block');
}
Demo: http://jsfiddle.net/bLamG/
How can I establish that?