Hi guys.. this is the first time I use Jquery Directly & with my hands purely.. I wrote this code: $("img.twitter").click(function(){
$("img.twitter").fadeOut("fast"); }); $("img.twitter").click(function(){ $("img.twitter").fadeIn("fast"); }); $("img.twitter").click(function(){ $("img.twitter").fadeOut("fast"); }); $("img.twitter").click(function(){ $("img.twitter").fadeIn("fast"); }); I want an image with the class twitter to fade in& out twice.. but it doesn't work.. when I tried to replace it with this: $(document).click(function(){ $("img.twitter").fadeOut("fast"); }); $(document).click(function(){ $("img.twitter").fadeIn("fast"); }); $(document).click(function(){ $("img.twitter").fadeOut("fast"); }); $(document).click(function(){ $("img.twitter").fadeIn("fast"); }); it works but when when clicking on any place on the page, I don't need it like that, I need it only on the image.. what is the wrong in that?