jquery - How to add class to odd class "recensie" within section with class 'album_revieuws' -
so have question.
i wondering how can add together class "selected" every odd class called recensie within section class album_reviews only.
<section class="album_reviews"> <h2 class="sectiontitel"> album reviews </h2> <article class="recensie"> <h1> neil young – letter home </h1> <img src="images/albums/a_letter_home.jpg" alt="album_image"/> <p>earlier year, neil young unveiled pono, super-high-def sound service meant deliver sonic crimes of earbud era. next act, he's released acoustic covers set recorded @ jack white's nashville music shop on voice-o-graph--a super-low-def 1940s contraption looks phone booth , sounds few steps removed rusty tin can , twine. if it's meant kind of joke, here's punch line: in perverse way, letter home 1 of enjoyable records young has made century.</p> <p> <a href="http://www.rollingstone.com/music/albumreviews/a-letter-home-20140502#ixzz33g0hq3pw"> read more </a> </p> </article> </section> <section class="band_members"> <h2 class="sectiontitel"> band members</h2> <article class="recensie"> <h1> neil young </h1> <figure> <img src="images/artists/neil_young.jpg" alt="macaque in trees"> <figcaption> neil young <br /> singer songwriter </figcaption> </figure> </article> </section> that's html code. know how add together class odd's not odds within section.album_reviews
hope can help
$('.album_reviews').find('.recensie:odd').addclass('selected'); demo
jquery
No comments:
Post a Comment