Stopping effects
As your application grows and you begin to have more complex effects, you may want to be able to stop these effects and transitions. This could be due to a user action that negates the requirement for a current effect or some other form of event.
Getting ready
Create a blank HTML document named recipe-5.html
and save it to the same directory as the latest version of the jQuery library.
How to do it…
Learn to stop jQuery effects by performing the following steps:
- Add the following HTML code to
recipe-5.html
to create a basic web page that will allow us to demonstrate how to stop effects:<!DOCTYPE html> <html> <head> <script src="jquery.min.js"></script> <script src="recipe-5.js"></script> <title>Chapter 4 :: JQuery Effects :: Recipe ...
Get jQuery 2.0 Development Cookbook 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.