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

Creating a blinking button


Using jQuery's effect functions, we can create a blinking button that can be used in a web application or website to draw the user's attention.

Getting ready

Create a blank HTML document named recipe-8.html and ensure you have the latest version of jQuery downloaded and ready to be included in this HTML file.

How to do it…

Learn how jQuery can be used to create a simple blinking button effect by performing the following steps:

  1. Add the following code to recipe-8.html, which you have just created, remembering to update the reference to the jQuery library.

    <!DOCTYPE html>
    <html>
    <head>
      <script src="jquery.min.js"></script>
      <script src="recipe-8.js"></script>
      <title>Chapter 4 :: JQuery Effects :: Recipe 8 </title>
      <link type="text/css" media="screen" rel="stylesheet" href="recipe-8.css" />
    </head>
    <body>
    <div class="frame">
      <h1>Newsletter!</h1>
      <p>Enter your email...