From the course: jQuery Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Sliding elements - jQuery Tutorial
From the course: jQuery Essential Training
Sliding elements
- [Voiceover] The jQuery element sliding functions are somewhat misnamed. They give you this misleading perception that they slide the elements around on the page, which is not really what happens. It's just another take on showing and hiding elements. So let's take a look at how they work. Let's open up the sliding_start file and you can see this is the familiar structure by now of our example page. So let's go ahead and bring this up in the browser. Here's our example page. I've got some buttons to trigger each one of the effects. So let's go back to the source code and for the first two examples we'll look at slide up and slide down. So I'll add the code for slide up here, and I'll do the same thing for the slide down handler. I didn't do an 'e' there. So let's save, let's refresh and let's take a look at this behavior. So let's go ahead and slide up, and let's slide down. The event when it's triggered, the element is basically shown and hidden but in this example it slides into…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.