Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
jQuery 1.4 Animation Techniques: Beginners Guide

You're reading from  jQuery 1.4 Animation Techniques: Beginners Guide

Product type Book
Published in Mar 2011
Publisher Packt
ISBN-13 9781849513302
Pages 344 pages
Edition 1st Edition
Languages
Concepts

Table of Contents (19) Chapters

jQuery 1.4 Animation Techniques Beginner's Guide
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Introduction 2. Fading Animations 3. Managing Animations 4. Sliding Animations 5. Custom Animations 6. Extended Animations with jQuery UI 7. Full Page Animations 8. Other Popular Animations 9. CSS3 Animations 10. Canvas Animations Pop Quiz Answers Index

Time for action – adding a license and defining configurable options


In a new file create the following outer structure for the plugin:

/*
  Plugin name jQuery plugin version 1.0

  Copyright (c) date copyright holder

  License(s)

*/

;(function($) {

  $.tranzify = {

    defaults: {
      transitionWidth: 40,
      transitionHeight: "100%",
      containerID: "overlay",
      transitionType: "venetian",
      prevID: "prev",
      nextID: "next",
      visibleClass: "visible"
    }
  };

})(jQuery);

What just happened?

All plugins should contain information on the plugin name and version number, the copyright owner (usually the author of the code) and the terms, or links to the terms, of the license or licenses it is released under.

The plugin is encapsulated within an anonymous function so that its variables are protected from other code which may be in use on the page it is deployed on, and has a semicolon placed before it to ensure it remains a discrete block of code after potential...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}