From the course: jQuery: Creating Plugins

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Challenge: An AJAX-enabled ads plugin

Challenge: An AJAX-enabled ads plugin - jQuery Tutorial

From the course: jQuery: Creating Plugins

Start my 1-month free trial

Challenge: An AJAX-enabled ads plugin

- Now it's time for a small challenge. Open the index.html file in the start folder of Chapter 3, video 7. You're gonna wanna open this example in Safari if you're on a Mac, or in Internet Explorer on Windows, if you're just opening it straight out of the Exercise Files. We'll go over why in a minute. Let's see what's happening here. This is a page from the Bright Ideas blog, with a scintillating first post. Then, over here in the sidebar is the area that we're gonna pay attention to, the Our Partners area with a couple of ads. It's not uncommon to have a suite of ads that you'd like to pull in and randomize. We have a plugin that's gonna do that. Let's take a look at the code. Here I am in that index.html file, and the plugin is not yet running. Let me uncomment this line and switch back. Now if I reload, I start to see a different selection of ads every time. This will only work in Safari, or Internet Explorer on Windows, because we're using AJAX to pull these files in, and those…

Contents