Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.        
  3.             $('document').ready(function(){
  4.                
  5.                 var len = data.length;
  6.                 for(var i=0; i<len; i++){
  7.                    
  8.                     $('#'+data[i]).mouseenter(function(){
  9.                         var id = $(this).attr('id');
  10.                         $('#p'+id).fadeIn();
  11.                     });
  12.                    
  13.                     $('#'+data[i]).mouseleave(function(){
  14.                         var id = $(this).attr('id');
  15.                         $('#p'+id).fadeOut();
  16.                     });
  17.                 }
  18.                
  19.             });
  20.        
  21.         </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement