Loading inline content using FancyBox

前端 未结 3 669
终归单人心
终归单人心 2020-12-07 15:50

Well, I\'m simply writing this post to hopefully help others that might come across the same issue.

The examples on the vendor website are a little vague and I had a

3条回答
  •  悲&欢浪女
    2020-12-07 16:21

    Just something I found for Wordpress users,

    As obvious as it sounds, If your div is returning some AJAX content based on say a header that would commonly link out to a new post page, some tutorials will say to return false since you're returning the post data on the same page and the return would prevent the page from moving. However if you return false, you also prevent Fancybox2 from doing it's thing as well. I spent hours trying to figure that stupid simple thing out.

    So for these kind of links, just make sure that the href property is the hashed (#) div you wish to select, and in your javascript, make sure that you do not return false since you no longer will need to.

    Simple I know ^_^

提交回复
热议问题