Appending dynamically generated html using jQuery does not play well with Fancybox

前端 未结 3 1135
醉话见心
醉话见心 2020-12-21 02:50

I\'m using Fancybox (http://fancybox.net) to pop open an iFrame. In order to do so, I create a link with a class set to \"item_pop\" as so:

3条回答
  •  旧巷少年郎
    2020-12-21 03:32

    The problem as i see it is that fancybox doesn't know anything about these additional links, as the JavaScript is only interpreted as the page loads. You need to use jQuerys .Live() so that fancybox will be aware of any dynamically created content.

提交回复
热议问题