Exercises
To complete these exercises, you will need the index.html file for this chapter, as well as the finished JavaScript code as found in complete.js. These files can be downloaded from the Packt Publishing website at http://www.packtpub.com/support.
The challenge exercises may require use of the official jQuery documentation at http://api.jquery.com/.
Create new plugin methods called
.slideFadeIn()and.slideFadeOut(), combining the opacity animations of.fadeIn()and.fadeOut()with the height animations of.slideDown()and.slideUp().Extend the customizability of the
.shadow()method so that the z-index of the cloned copies can be specified by the plugin user. Add a new sub-method calledisOpento the tooltip widget. This sub-method should returntrueif the tooltip is currently displayed andfalseotherwise.Add code that listens for the
tooltipopenevent that our widget fires, and logs a message to the console.Challenge: Provide an alternative
contentoption for the tooltip widget...