Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

2. DHTML Essentials > Converting into a jQuery Plug-in

Converting into a jQuery Plug-in

Converting the bouncy sprite application into a jQuery plug-in adds functionality that takes advantage of jQuery’s ability to easily search for DOM elements via CSS selectors and return them as a list for further processing. The plug-in will search for any specified elements and attach multiple bouncySprite instances to them via the bouncyBoss object. It will also allow you to change the background color of the elements being attached to and the number of bouncySprite instances being attached.

Although converting the bouncy sprite application into a flexible jQuery plug-in may sound like a substantial job, there’s actually less work involved than you might expect. Because of the modular and self-contained way in which the DHTMLSprite, bouncySprite, and bouncyBoss objects were developed, they will slip unobtrusively into a jQuery plug-in structure.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint