jQuery - Shadowbox rebinding

前端 未结 2 1337
礼貌的吻别
礼貌的吻别 2021-01-18 09:40

How do I bind / initialize Shadowbox to content loaded by jQuery using AJAX?
Right now shadowbox works when I first come into the site.

However, when I swap the

相关标签:
2条回答
  • 2021-01-18 10:20

    Actually, i personally had to do:

            Shadowbox.clearCache();
            Shadowbox.setup();
    

    to get shadowbox to acknowledge the DOM change.

    0 讨论(0)
  • 2021-01-18 10:21

    Ah I just found the solution.

    Shadowbox.init can't be called 2 times.

    So use this instead.
    Shadowbox.setup();

    Thanks,
    Tee

    0 讨论(0)
提交回复
热议问题