[Plugin: jQuery Colorbox] Colorbox for links not working on dynamically created links
-
Hey there,
First let me say that Colorbox is totally awesome. Hands down best lightbox plugin I’ve used for WordPress 🙂
I’ve been working on a site where I use the colorbox for links functionality a fair bit, and it’s been working great so far.
However I’ve run into one small issue where it’s not working in one place where the link is dynamically placed as a result of a jQuery AJAX call.
The HTML returned from the AJAX query includes an anchor with a class of ‘colorbox-link’. This is working without issue on the rest of the ‘static’ html links with this class.
I think it’s probably due to use of .bind instead of .on, I think. Certainly I noticed this issue before where I was trying to adjust a dynamically created select option. It only worked when I switched to .on(‘change’, etc {
Is this something that I could manually over-ride without adjusting the plugin-code, or do I need to hope that a plugin update might fix it?
Thanks!
Alex
- The topic ‘[Plugin: jQuery Colorbox] Colorbox for links not working on dynamically created links’ is closed to new replies.