O'Reilly logo

Instant Fancybox by Kyle Diedrick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading content via AJAX (Intermediate)

A common way to load additional HTML content is through asynchronous connections, commonly called AJAX (Asynchronous JavaScript and XML), but it is common to use AJAX to refer to all asynchronous JavaScript. Let's take a look at having Fancybox load content from our server asynchronously.

Getting ready

Up until this point all of the examples can work without a web server. If you have not been running examples on a web server, you will need to use one for this example. It does not matter which one you use, though I would recommend using a package that includes Apache such as WAMP if you are on Windows, MAMP if you are on Mac OS X, or XAMPP for Linux. A web server is required because JavaScript has a security ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required