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 5 </title> <link type="text/css" media="screen" rel="stylesheet" href="recipe-5.css" /> </head> <body> <div class="frame"> <div class="actions"> <button...