There are 3 objects $ ('. Ground') and 3 objects $ ('. Tip') It is necessary that when you hover on $ ('. Ground') i-th piped up $ ('. Tip') i-th
Through jQuery Object fail https://learn.jquery.com/using-jquery-core/jquery-object/
<div class='ground'>red</div> <div class='ground'>green</div> <div class='ground'>blue</div> <div class='tip' style="background-color:red;"></div> <div class='tip' style="background-color:green;"></div> <div class='tip' style="background-color:blue;"></div> <script> var gruond = $('.ground'); for (i=0; i<=gruond.length; i++) { gruond[i].mouseenter(function(){ $('.tip')[i].fadeIn("slow"); }) gruond[i].mouseleave(function(){ $('.tip')[i].fadeOut("slow"); }) } </script> What is wrong here? http://jsfiddle.net/Nata_Hamster/tcf43p96/