Thanks for the post, this just help me figure out the problem I was having with binding click events to dynamically generated links.
-Roman On Mar 26, 1:19 am, boermans <[EMAIL PROTECTED]> wrote: > The problem is that when you run: > > $('img.remove').click(function() { > console.log('test'); > return false; > > }); > > The image you are attempting tobindto doesn't exist. > To get around this you will need tobindthe remove function after > adding the player. > There's a few ways to do this - perhaps put it in a function: > > function bindremove(){ > $('img.remove').click(function() { > // your code > }); > > } > > And add it to the add player function: > > $('a#addPlayer').click(function() { > // your code > bindremove(); > return false; > > }); > > Not tested - but hopefully you get the idea? > > Cheers > Ollie > > On Mar 26, 7:25 am, Up-Works <[EMAIL PROTECTED]> wrote: > > > Do I have to use .bind('click','fn')? or another method to haveclick > > fire on dynamically added elements to the DOM?