Support » Plugin: jQuery Colorbox » [Plugin: jQuery Colorbox] Reinitiating Colorbox when ajax content is loaded.

  • The theme I am using loads content into a div via ajax/jquery, here is a link to the site, http://d53513.u29.emggroup.info/

    I have colorbox working on the initial load of a page, if you click on the video thumbnail it opens the youtube video in he colorbox, however if you click on the “Allergy & Sinus” category link in the right side bar then click on the video thumbnail, colorbox isn’t working because the cboxElement class is not being applied to the newly loaded content.

    How can I reinitialize the colorbox jQuery action that appends the cboxElement class to the link and make this function properly?

    Can I add a function to using the .ajaxComplete function when the content finishes loading.

    http://wordpress.org/extend/plugins/jquery-colorbox/

Viewing 1 replies (of 1 total)
  • The answer….

    add the following to the function that loads in the new content, very last item (colorboxSelector();) see below.

    $mainContent.load(URL, function() {
        $ajaxSpinner.fadeOut();
        $mainContent.animate({ opacity: "1" });
    	colorboxSelector();
    });
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: jQuery Colorbox] Reinitiating Colorbox when ajax content is loaded.’ is closed to new replies.