The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Programming Fundamentals" Dec 02 - 2:00 PM Eastern

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:


    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

    How do I call it again?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed