jQuery 1.4 Animation Techniques - Index of
jQuery 1.4 Animation Techniques - Index of jQuery 1.4 Animation Techniques - Index of
work on almost all numerical CSS styles. Over the course of this book, we'll look at every animation method that the library contains in detail. These methods are listed below: animate() clearQueue() delay() dequeue() fadeIn() fadeout() fadeTo() fadeToggle() hide() queue() show() slideDown() slideToggle() slideUp() stop() toggle() All in all, it gives us a powerful and robust environment to easily add almost any type of animation that we can conceive. Animation is also a popular theme for plugins, with many available plugins that bring different types of animations to our fingertips, for instant implementation with minimal configuration. We'll look at several plugins later in the book. The template file Each of the example files we'll create throughout the course of this book will rely on a common set of elements. Rather than repeatedly showing these same elements in every single code section and example in the book, I'll show you them just once now:
Introduction of the template file", I mean insert it directly between the opening tag and the first tag in the template file, as shown above. Whenever we add any JavaScript to the template file, it will be added within the anonymous function in the second tag. Let's just take a look at what the template file contains. We start out with the HTML5 doctype declaration as we'll be using plenty of HTML5 elements in our examples. We also set the lang attribute of the element to en, and tag with its charset attribute to utf-8, neither of which are strictly required but are nevertheless best practice. Next comes an empty element, to which we can add the name of each example, and a element with an incomplete href, ready for us to add the name of the stylesheet that each example will use. Because current versions (prior to version 9) of Internet Explorer don't support any HTML5 elements, we need to use Remy Sharp's html5shiv script to make this browser use them correctly. We can link to the online version of this file for convenience using a conditional comment that targets all versions of IE lower than version 9. Feel free to download html5. js and store it locally if you plan on playing with the examples in IE while disconnected from the Internet. [ 12 ]
- Page 2 and 3: Download from Wow! eBook jQuery 1.
- Page 4 and 5: Author Dan Wellman Reviewers Shaifu
- Page 6 and 7: About the Author Dan Wellman is an
- Page 8 and 9: Cyril Pierron is an engineer, a web
- Page 12: For Pat Spacagna, the greatest moth
- Page 15 and 16: Download from Wow! eBook Table of
- Page 17 and 18: Table of Contents Time for action -
- Page 19 and 20: Table of Contents jQuery and transf
- Page 21 and 22: Drawing to the canvas 309 Supportin
- Page 23 and 24: Preface What this book covers Chapt
- Page 25 and 26: Preface Have a go hero - heading Th
- Page 27 and 28: Preface Piracy Piracy of copyright
- Page 29 and 30: Introduction In addition to animate
- Page 31: Introduction When not to use animat
- Page 35 and 36: Introduction In the previous screen
- Page 37 and 38: Introduction Once our variables hav
- Page 40 and 41: 2 Fading Animations In this chapter
- Page 42 and 43: [ 21 ] Chapter 2 We can control the
- Page 44 and 45: The previous screenshot shows how t
- Page 46 and 47: [ 25 ] Chapter 2 Most of the styles
- Page 48 and 49: 2. What else can be passed into the
- Page 50 and 51: Time for action - creating the dial
- Page 52 and 53: [ 31 ] Chapter 2 For example, the a
- Page 54 and 55: Download from Wow! eBook The follo
- Page 56 and 57: [ 35 ] Chapter 2 The CSS is used mo
- Page 58 and 59: The fadeTo() method is used in the
- Page 60 and 61: [ 39 ] Chapter 2 #messageList table
- Page 62 and 63: [ 41 ] Chapter 2 What just happened
- Page 64 and 65: 2. What format can these arguments
- Page 66 and 67: } var el = $(this); if (el.css("fil
- Page 68 and 69: [ 47 ] Chapter 2 Usually these meth
- Page 70 and 71: Time for action - animations with s
- Page 72 and 73: Download from Wow! eBook [ 51 ] Ch
- Page 74 and 75: 2. Save the changes as toggle.html.
- Page 76 and 77: 3 Managing Animations Like most of
- Page 78 and 79: [ 57 ] Chapter 3 A custom queue tha
- Page 80 and 81: If we wish to see how many function
Introduction<br />
<strong>of</strong> the template file", I mean insert it directly between<br />
the opening tag and the first tag in the template file, as shown above.<br />
Whenever we add any JavaScript to the template file, it will be added within the anonymous<br />
function in the second tag.<br />
Let's just take a look at what the template file contains. We start out with the HTML5<br />
doctype declaration as we'll be using plenty <strong>of</strong> HTML5 elements in our examples. We also set<br />
the lang attribute <strong>of</strong> the element to en, and tag with its charset attribute<br />
to utf-8, neither <strong>of</strong> which are strictly required but are nevertheless best practice.<br />
Next comes an empty element, to which we can add the name <strong>of</strong> each example,<br />
and a element with an incomplete href, ready for us to add the name <strong>of</strong> the<br />
stylesheet that each example will use.<br />
Because current versions (prior to version 9) <strong>of</strong> Internet Explorer don't support any HTML5<br />
elements, we need to use Remy Sharp's html5shiv script to make this browser use them<br />
correctly. We can link to the online version <strong>of</strong> this file for convenience using a conditional<br />
comment that targets all versions <strong>of</strong> IE lower than version 9. Feel free to download html5.<br />
js and store it locally if you plan on playing with the examples in IE while disconnected from<br />
the Internet.<br />
[ 12 ]