The problem is that the clicked element is always the image, not the span.
$.listen( 'click', 'img.reflect', function() { alert("Click!"); }); Cheers -- Ariel Flesler http://flesler.blogspot.com On Aug 18, 3:54 pm, Brian Schilt <[EMAIL PROTECTED]> wrote: > try applying 'Listen' to the images container and adding the click > listener to the 'thumbs' class. > > $('#images-container').listen('click', '.thumbs', function(){ > alert('click'); > > }); > > Brian > > On Aug 18, 11:50 am, sergeh <[EMAIL PROTECTED]> wrote: > > > I was easily able to make the plugin work where I needed to add things > > dynamically via jquery. > > But now I can't get it work on another page where I need to add a few > > div via ajax > > > When I click on a <li> I fetch some images via ajax and they get > > displayed inside of a container. My problem is that I need to be able > > to hover and click on those images so a normal jQuery selector isn't > > working and when I try the listen plugin it isn't working either... > > > this is what I have > > > <div id="images-container"> > > <!-- images are loaded via ajax in here like so --> > > <div class="thumbs"> > > <span class="clickable"><img src=".." width="81" class="reflect > > rheight20" /></span> > > </div> > > </div> > > > and this is how I try to capture a click > > > $.listen( 'click', '.clickable', function() { > > alert("Click!") > > > }); > > > but it won't even fire.... any ideas why?