Noob question about fadeIn and fadeOut
I'm starting to learning jQuery and i have this problem:
I have a <h2 id="click1"> and a <div id="div1" style="display:none;">.. i put a fadeIn for div when click on the h2 text, but i need to fadeOut when click h2 again...
I tryied this:
- $("#click2").click(function(){
$("#div2").fadeIn("slow", function(){
$("#click2").click(function(){
$("div2").fadeOut("slow");
});
});
});
But it fadeIn and fadeOut at same click
lol
Thank you guys