Animations and Effects
Users like a fluid user interface (UI) that quickly responds to their actions. The jQuery framework provides a set of animations and effects for enhancing the way your UI transitions based on user input. As these effects happen, the other markup on the page moves in response. If you slide a new bullet into a list, for example, the other bullets move to make space for the new one. The jQuery animations and effects are an easy way to add more “feel” to the look of your UI.
A simple example is to use the .hide() and .show() methods of jQuery. Recall the average speed calculator example markup (refer to Listing 18.2). You can mark the <div id='calculation'> with the hidden attribute. You can then add the following line to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access