I'm working on a menu wich I can expand and collapse. When I click it my code works fine and collapses the div. And if I click again on my open en close div it opens fine also. But The second time doing this procces my div closes and opens directly. Can someone tell what I'm doing wrong..
$( document ).ready(function(e) { // Collapse and expand $("#collapse").click( function() { $("#information").fadeOut(200); $("#leftColumn").animate({width:"10px"}, 200); $("#collapse").html("»"); $(this).click(function() { $("#information").fadeIn(200); $("#leftColumn").animate({width:"250px"}, 200); $("#collapse").html("«"); }); } ); });