I'm looking to modify this code in order to have my content auto fade in after about 1-2 seconds. currently, it only fades in when you move the mouse cursor over the content. $(document).ready(function(){ $(".latest_img").fadeTo("slow", 0.3); $(".latest_img").hover(function(){ $(this).fadeTo("slow", 1.0); },function(){ $(this).fadeTo("slow", 0.3); }); }); Code (markup): thx for any help!
try this: var foo = setTimeout(function() { $(".latest_img").fadeTo("slow", 1); }, 2000); // 2 seconds $(".latest_img").hover(function() { // remove auto fade if the mouseover takes place first clearTimeout(foo); $(this).fadeTo("slow", 1.0); }, function() { $(this).fadeTo("slow", 0.3); }); PHP: