Abuda Posted May 7, 2011 Share Posted May 7, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/235774-trigger-jquery-with-onclick/ Share on other sites More sharing options...
Abuda Posted May 8, 2011 Author Share Posted May 8, 2011 Dumb question, turned out that I could place JQuery inside a Javascript function. Quote Link to comment https://forums.phpfreaks.com/topic/235774-trigger-jquery-with-onclick/#findComment-1212226 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.