I have 3 <section>s on a page with the class .slider and within these there are several <article>s. For the purpose of making these work as tabbed content I want to use jQuery to hide all but the first of each these <article>s.
The following:
$(".slider > article:not(:first)").hide();
hides everything but the first <article> in the first <section>, I need it to iterate through the three <section>s and hide the first in each of these. I assume I need to use each() to loop through them, but I can’t make anything work.
If it isn’t the first child, you can do this.