svgmx5 Posted June 29, 2010 Share Posted June 29, 2010 I got this function online, that uses the .animate function to add opacity to images when the user hovers over it. my problem is that i'm want to have the images have 50% opacity when the page loads...right now it only does it if the user hovers over it. <script type="text/javascript"> $(document).ready(function(){ $("#project_thumb_navigation img").hover(function() { $(this).stop().animate({opacity: "1"}, '1000'); }, function() { $(this).stop().animate({opacity: "0.5"}, '1000 '); }); }); </script> Link to comment https://forums.phpfreaks.com/topic/206150-need-help-with-this-jquery-animate-function/ Share on other sites More sharing options...
svgmx5 Posted June 29, 2010 Author Share Posted June 29, 2010 Never mind i figured it out myself All i had to do was add .animate(opacity : '0.5) before the .hover() Link to comment https://forums.phpfreaks.com/topic/206150-need-help-with-this-jquery-animate-function/#findComment-1078598 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.