Im working on function to toggle a menu on click but cannot make it work since it got deprecated with jQuery 1.9.
I have no idea how to manage to make work.
I want to click on the menu img once and expand the menu and the next time I do that it will hide again.
This is my code:
$(document).ready(function(){
$('.menu img').click(function(){
var wWidth = $(window).width();
var wHeight = $(window).height()
$('.menu').animate({width: wWidth + 'px', height: wHeight + 'px'}, 500);
$('.menu').toggleClass('menu_expanded');
});
Thanks in advance.
Here is the JSfiddle as request: http://jsfiddle.net/czef8ofb/