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 (
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
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
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
thank you Pierre and Charlie, this is exactely what i'm looking for ;)
regards,
f.
5 matches
Mail list logo