Sliding page elements
The ability to slide page elements allows the developer to create an array of interfaces such as the accordion. This recipe will show you how to apply the slide effect to a range of elements.
Using your favorite text editor or IDE, create a blank HTML page in an easily accessible location and save this file as
recipe-1.html. Ensure that you have the latest version of jQuery downloaded at the same location as this HTML file.
How to do it…
Learn how to use jQuery to slide page elements by performing the following steps:
- Add the following HTML code to
recipe-1.html. Be sure to change the source location of the jQuery library, pointing it to where the latest version of jQuery is downloaded and placed on your computer. ...