JQuery fadeIn and fadeOut of element's sibling - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:fadeOut

Description

JQuery fadeIn and fadeOut of element's sibling

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.0.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){/*from w w w .  j a  v a 2s .c  om*/
$('.hover').hover(function() {
    $(this).next().fadeOut();
}, function() {
    $(this).next().fadeIn();
});
    });

      </script> 
 </head> 
 <body> 
  <img class="hover" src="http://www.java2s.com/style/demo/InternetExplorer.png"> 
  <img src="http://www.java2s.com/style/demo/Opera.png">  
 </body>
</html>

Related Tutorials