shadowbox stops working after jquery function call

前端 未结 3 1299
花落未央
花落未央 2020-12-19 04:36

I have a shadowbox script. When I load the page everything works fine, but when I call this jquery load function and then try to trigger the shadowbox by clicking on the ima

3条回答
  •  被撕碎了的回忆
    2020-12-19 05:19

    This worked for us, we made a site that used vertical tabs and called in the pages with our shadowbox images using jQuery.load

    Just give all of your anchor tags the class="sbox" and paste this script in the header.

    
    

    Note: we had to put the .sbox class on all our rel="shadowbox" anchors as well as the on the anchor for the tab that called the .load

    Thanks to this guy-> http://www.webmuse.co.uk/blog/shadowbox-ajax-and-other-generated-content-with-jquery-and-javascript/

提交回复
热议问题