CHAPTER 10
More jQuery Plug-ins
You ended the last chapter with a pretty awesome accordion plug-in that you built based on the initial accordion code you wrote in Chapter 7. In this chapter, you will take your Dribbble API work from Chapter 8 and turn it into a plug-in. You’ll do this by making a slightly different type of plug-in, one that exists directly on the jQuery object. This means instead of calling it on a set, as you did previously:
$("div").somePlugin();
You call it directly:
$.somePlugin();
There are certain situations in which you should use the first style, and other situations where you should use the latter. I’ll explain those. ...
Get Beginning jQuery now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.