found a solution: instead of using the click function i tried it with .live(click, function)
On 29 Jul., 16:51, BroOf <kontaktpl...@googlemail.com> wrote: > Hey all! I have a inputfield with the class .url. If the user types a > url into the field it will be added to a list (function addurl) thats > nor problem but if I want to delete a item it doesn't work. It seems > that jquery doesn't accept it. if I add a list item manual it > works.... > > Works: > > function addurl(linkurl){ > $('.insert ul').append('<li><div class="remove"></div>'+linkurl+'</ > li>');}; > > $('.add').click(function(){ > var linkurl = $('.url').attr("value") > addurl(linkurl); > $('.url').attr("value",""); > > }); > > Doesn't work: > > $('.remove').click(function(){ > alert('test'); > > > > });