All,
I’m trying to load some content into a fancybox. I’d like to load some page content using AJAX. How can I load this content into my fancybox using AJAX and version 1.3?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To load AJAX content into FancyBox by clicking a link, you could use the following method, taken directly from the FancyBox examples (http://fancybox.net/howto):
Note this works perfectly but if you want to specify other parameters to the fancy box you can do following:
For other parameters refer to the fancybox documentation.
You could always specify the
hrefwithin the JavaScript by using thehrefoption (http://fancybox.net/api).UPDATE: I see you’re using 1.3.4 so links have been updated accordingly.
UPDATE: If you were to update to FancyBox 2, you could use the following example from the FancyBox website (http://fancyapps.com/fancybox/#examples):