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> Quote Link to comment 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() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.