Advertisement
Guest User

Jquery Opacity

a guest
Oct 22nd, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3.     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  4.     <script>
  5.  
  6.         $(document).ready(function() {
  7.     $("#opacity").css("opacity", 0.5);
  8.     $("#opacity").hover(function() {
  9.         $(this).animate({opacity: 1.0}, 500);
  10.     }, function() {
  11.         $(this).animate({opacity: 0.5}, 500);
  12.     });
  13. });
  14.  
  15.     </script>
  16. </head>
  17. <body>
  18.     <img src="bilder/plumberhouston.png" id="opacity" />
  19. </body>
  20. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement