Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a page which retrieves some new content from server thru ajax.
In the newly added content, the colorbox is not working. i think this is becoz they are newly added element and not yet being processed by the colorbox module. So those new elements only have the "colorbox-load" class but not "colorbox-load init-colorbox-load-processed-processed cboxElement".
is the any way i could apply colorbox on them?
Thanks
Comments
Comment #1
frjo CreditAttribution: frjo commentedClosing old issues that doesn't seem to affect a lot of users.
Comment #2
Heihachi88 CreditAttribution: Heihachi88 commentedNot working with Drupal 7 Ajax framework. When you load content by the link click and your new content is appearing, colorbox is not working it just has a class colorbox.
Comment #3
gregory_kapustin CreditAttribution: gregory_kapustin commentedYou have to have a trigger after your ajax content is loaded.
For example, commerce_ajax_cart gives a trigger when it updates the cart :
This way, i can trigger in JS on this event and attach behaviors to my loaded content.
Comment #4
frjo CreditAttribution: frjo commented