jQuery 1.4 Animation Techniques - Index of
jQuery 1.4 Animation Techniques - Index of jQuery 1.4 Animation Techniques - Index of
[ 17 ] Chapter 1 c. A string or integer representing the speed or duration of the animation as the first argument, the ending opacity of the target element, and optionally a callback function to be executed when the animation ends d. No arguments are required Have a go hero – extending the loading animation I mentioned that we could use the loading animation when making requests and waiting for a response. Try using it with jQuery's AJAX methods, showing the loader just before making the request, and hiding it again once the response has been processed. The JSONP example, which retrieves images of cats, on the jQuery website (at http://api.jquery.com/ jQuery.getJSON/) makes a great test case, although depending on the speed of your connection, the loader may not be visible for very long. Summary In this introductory chapter, we looked at a brief history of animation on the Web including how it began, early HTML elements and browser support, the rise of Flash, and the direction it's heading in the not too distant future. We also looked at how animations can be used in a user interface to enhance the user experience. We saw some guidelines as to when animation should and shouldn't be used and looked at some of the things we should consider when implementing animations. We closed the chapter with a basic example looking at a loading animation. In this example, we used the fadeTo() jQuery method to change the opacity of elements on the page, and a simple interval to "play" the animation. We didn't cover the method in full detail, but we saw one example of how it can be used. We'll look at this method in more detail in the next chapter, which covers all of the fading animations provided by jQuery.
- 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 and 32: Introduction When not to use animat
- Page 33 and 34: Introduction of the template file"
- Page 35 and 36: Introduction In the previous screen
- Page 37: Introduction Once our variables hav
- Page 41 and 42: Fading Animations Fading animations
- Page 43 and 44: Fading Animations A useful point to
- Page 45 and 46: Fading Animations text-decoration:n
- Page 47 and 48: Fading Animations What just happene
- Page 49 and 50: Fading Animations This is how our d
- Page 51 and 52: Fading Animations 4. Save this in t
- Page 53 and 54: Fading Animations One thing to watc
- Page 55 and 56: Fading Animations Time for action -
- Page 57 and 58: Fading Animations In the previous s
- Page 59 and 60: Fading Animations Time for action -
- Page 61 and 62: Fading Animations }), remove = $(""
- Page 63 and 64: Fading Animations Next we pass a re
- Page 65 and 66: Fading Animations text: "Cancel", t
- Page 67 and 68: Fading Animations When we run the n
- Page 69 and 70: Fading Animations Our fly-out menu
- Page 71 and 72: Fading Animations nav ul { padding:
- Page 73 and 74: Fading Animations Animated toggling
- Page 75 and 76: Fading Animations We also covered t
- Page 77 and 78: Managing Animations Replacing the e
- Page 79 and 80: Managing Animations 2. Finally, in
- Page 81 and 82: Managing Animations Running this co
- Page 83 and 84: Managing Animations jQuery handles
- Page 85 and 86: Managing Animations 3. Now change t
- Page 87 and 88: Download from Wow! eBook Managing
[ 17 ]<br />
Chapter 1<br />
c. A string or integer representing the speed or duration <strong>of</strong> the animation as<br />
the first argument, the ending opacity <strong>of</strong> the target element, and optionally<br />
a callback function to be executed when the animation ends<br />
d. No arguments are required<br />
Have a go hero – extending the loading animation<br />
I mentioned that we could use the loading animation when making requests and waiting for<br />
a response. Try using it with <strong>jQuery</strong>'s AJAX methods, showing the loader just before making<br />
the request, and hiding it again once the response has been processed. The JSONP example,<br />
which retrieves images <strong>of</strong> cats, on the <strong>jQuery</strong> website (at http://api.jquery.com/<br />
<strong>jQuery</strong>.getJSON/) makes a great test case, although depending on the speed <strong>of</strong> your<br />
connection, the loader may not be visible for very long.<br />
Summary<br />
In this introductory chapter, we looked at a brief history <strong>of</strong> animation on the Web including<br />
how it began, early HTML elements and browser support, the rise <strong>of</strong> Flash, and the direction<br />
it's heading in the not too distant future.<br />
We also looked at how animations can be used in a user interface to enhance the user<br />
experience. We saw some guidelines as to when animation should and shouldn't be used<br />
and looked at some <strong>of</strong> the things we should consider when implementing animations.<br />
We closed the chapter with a basic example looking at a loading animation. In this example,<br />
we used the fadeTo() <strong>jQuery</strong> method to change the opacity <strong>of</strong> elements on the page, and<br />
a simple interval to "play" the animation. We didn't cover the method in full detail, but we<br />
saw one example <strong>of</strong> how it can be used. We'll look at this method in more detail in the next<br />
chapter, which covers all <strong>of</strong> the fading animations provided by <strong>jQuery</strong>.