[jQuery] Re: remove one element in an array

2009-06-12 Thread Pierre Bellan
Hi, An id must be unique on a page. In your code, every created image as the same id maybe the problem is here but i'm not sure. I think the first step is to replace id with a class and see if it works. You can use the live event gestion if you use jquery 1.3 (

[jQuery] Re: remove one element in an array

2009-06-12 Thread fabrice.regnier
hi ;) An id must be unique on a page. In your code, every created image as the same id maybe the problem is here but i'm not sure. Yes, i guess, this is the problem. I think the first step is to replace id with a class and see if it works. Can you give some exemple ? The probleme is: i want

[jQuery] Re: remove one element in an array

2009-06-12 Thread fabrice.regnier
Can you give some exemple ? $(#IdButton).click( function() { var pic=pimg id=\IdPicture\ name=\IdPicture[]\ class=whatever src=\../ images/icone_ko_small.png\//p $(this).before(pic); }); $(img.whatever).livequery('click', function(event) { $(this).remove(); }); regards, f. The

[jQuery] Re: remove one element in an array

2009-06-12 Thread Charlie
changing to class will do what you need here's an example using live() instead of livequery since it is built into jquery now and works for click function you are using I just changed to a UL instead of images http://jsbin.com/ewutu fabrice.regnier wrote: hi ;) An id must be

[jQuery] Re: remove one element in an array

2009-06-12 Thread fabrice.regnier
thank you Pierre and Charlie, this is exactely what i'm looking for ;) regards, f.