Join Joe Chellman for an in-depth discussion in this video Adding more-powerful options using functions, part of jQuery: Creating Plugins.
And remember that you need to load this…in Safari on the Mac or Internet Explorer on Windows…for it to work right on the file system…without a local web server.…So looking at these ads over here,…before, we defined the ad source as a static array.…Let's look at another way that we can handle this…using a function instead of a static array.…So here in the html file,…this is what I'm talking about.…Here are the options, just like they were before,…as far as num_displayed goes.…But then for ads_sources, instead of…
- Writing basic jQuery filters
- Converting filters to plugins
- Converting code to plugins
- Making plugins configurable
- Adding appearance options and functions
- Distributing jQuery plugins