Book Image

jQuery 2.0 Development Cookbook

By : Leon Revill
Book Image

jQuery 2.0 Development Cookbook

By: Leon Revill

Overview of this book

Table of Contents (17 chapters)
jQuery 2.0 Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. 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...