Using jQuery .hide() with fading Using jQuery .hide() with fading jquery jquery

Using jQuery .hide() with fading


$("div").click(function () {  $(this).fadeOut(1000);})

There are also fadeIn and fadeToggle.


You might use @Arnelle's solution if you want to fadeOut or

replace $(this).hide("fade", {}, 1000);with

     $(this).hide("slow");//or $(this).hide(1000);

passing "slow" will give a nice animation before hiding your div.

Modified your fiddle with changes: http://jsfiddle.net/Z9ZVk/8/


Try using fadeout with duration instead of using hide.

   if(allSelected.length > 0){        $("div.prodGrid > div:not(" + allSelected + ")").fadeOut(1000);    }

Working Fiddle