Jump to content

trigger JQuery with onClick ??


Abuda

Recommended Posts

Hi, I have this problem,

I have an array of images with the same class name, I created a JQuery function that looks like this:

 

$(".delPic").click(function() {
// action goes here ....
});

 

The problem is, there is a function in my page that inserts a new similar image (class='delPic') using .insertAfter().

now the function shown above won't work since the new image is inserted after the document is loaded.

 

what do I do ?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/235774-trigger-jquery-with-onclick/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.