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

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.