Hi, I searched a bit on the Internet, but did not find what I was really looking for. But in any case, what I'm looking for seems to be that if the element is hidden, then it will take an action, and then, if the element is visible, it will take another action. In this case, I create the show / hide menu, when you click on the menu icon (with the ".toggle" class), it will change the opacity to 1, and when you hide the menu, the opacity of the icon will change to 0.6 again.
Here is my code anyway:
$(".sidebar_menu").hide(); $(".sidebar li.toggle").click(function(){ $(".sidebar_menu").animate({width: "toggle"}, 200);
Hope you guys want to help me, it would be nice! Thanks.
Jens kvist
source share