Grow your CSS skills. Land your dream job.

How to reinitialize a lightbox plugin (slimbox2) after ajax call?

  • # October 17, 2012 at 5:59 am

    We use some ajax to update a photo on a page. But afterwards, the slimbox lightbox no longer works. Previously, it does.

    I tried doing:

    window.opener.slimbox2();

    But it immediately opens the lightbox (as in the screen darkens and a white box appears at the middle). What I’d like is just to get the slimbox2 plugin sort of ready, not immediately pop-out. I tried looking at the js code for slimbox2 but it’s already the minified version and it seems that the entire function is automatically called as it has this format:

    (function () {
    // code here
    })(jQuery);

    How do I call it again?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".