DevTips / Parallax-on-the-Web-DevTips-

The code that accompanies the video series on YouTube called "Parallax on the Web" — https://www.youtube.com/playlist?list=PLqGj3iMvMa4IyCbhul-PdeiDqmh4ooJzk
345 stars 242 forks source link

Removed redundant jQuery selector #24

Open SkaterDad opened 9 years ago

SkaterDad commented 9 years ago

When inside of the $('.clothes-pics figure').each loop, you can use $(this) to grab the current item. No need to do another query using $('.clothes-pics figure').eq(i).

As a programmer, I cringed a little when I saw this in the video :stuck_out_tongue:

Thanks for the kick ass videos!