$('div.car div'); You should add the tagname if possible, it makes it MUCH faster.
Use $('div.car > div'); if the divs need to be exactly (one level) below div.car. Please... do check the docs, it's faster for everyone: http://docs.jquery.com/Selectors Ciao -- Ariel Flesler http://flesler.blogspot.com On 17 abr, 11:28, cloudsteph <[EMAIL PROTECTED]> wrote: > Is there a way of targeting nested elements by class name? In the > example below, I want to be able to attach a "click" event to all divs > with ".car" class applied and then control the children within the > ".car" div that is clicked. None of the children can have unique IDs > unfortunately. Any ideas anyone? I've tried a few combinations but > no success :( > > HTML: > > <div class="car"> > <div class="car_price">content here<div> > <div class="car_details">content here<div> > <div class="car_photos">content here<div> > <div> > > The JS: > > if($(".car").length > 0){ > $(".car").click(function(){ > do stuff to specific child elements > }); > > > > }- Ocultar texto de la cita - > > - Mostrar texto de la cita -