Loop through element of a defined size in Jquery? <p>I'm creating an animation for my website where I got different divs containing an image and an aside where I put my text describing something related to the image. The aside is a little bit wider than my picture and what happens is that when I hover it, it slides to the right and has his width increased. </p> <p>When I hover another one the first one goes back to its initial position. So I found a solution that obliged me to naturally loop through all the divs that are not hovered, but the problem now is since every divs (including the one hovered last) is not hovered, they all get the animation (thus creating a visual bug because the aside is placed absolute and behind the image) while i'd like it to be only on the first one. </p> <p>So I thought I should loop through all the divs that are not hovered AND got a defined sized (the one they got after they are behind shown), but I couldnt get it work, neither did I find a solution to loop through elements with the each function... </p> <p>Here is my HTML code : </p> <pre><code> &lt;div class="partenaires-wrapper"&gt; &lt;img src="http://mylor.fr/mauro/wp-content/uploads/2014/08/sharks.png" alt="" width="223" height="138" /&gt; &lt;div class="partenaires-aside"&gt; Sed rutrum elementum odio, ut efficitur magna efficitur sit amet. Phasellus posuere eget felis non tempor. Morbi elementum, velit non aliquam suscipit, odio orci viverra felis, sit amet elementum tellus mauris a nunc. Aliquam nec nisl eget nunc pulvinar varius commodo id urna. Duis ac sem erat. Pellentesque aliquet posuere justo ac luctus. Aliquam porta placerat blandit. &lt;/div&gt; </code></pre> <p>and the Javascript part : </p> <pre><code>$(".partenaires-aside").mouseover(function () { $(".partenaires-aside").not(this).each(function () { $(this).delay( 800 ).animate({'width':'24%'}, 500); $(this).animate({'margin-left':'0%'}, 500); $(this).find("p").hide("slow"); }); $(this).animate({'margin-left':'30%'}, 500); $(this).animate({'width':'60%'}, 500); $(this).find("p").show("slow"); }); </code></pre> <p>I really dont know if made myself clear, but I hope you understood correctly. Thank you in advance for you help!</p>