From the course: jQuery Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Fading elements

Fading elements - jQuery Tutorial

From the course: jQuery Essential Training

Start my 1-month free trial

Fading elements

- {Trainer] Now let's take a look at the element fading functions. In your code editor, open up fadeeffect_start and let's just go ahead and bring this up in the browser right away. All right, so this is the document that we're going to be working with. I've got my example div along with some buttons I'm going to be using to trigger certain kinds of effects. So, let's go back to the code and let's begin by trying the Fade In and Fade Out functions. So, for Fade In, I'll get my reference to #theDiv and call .fadeIn and similarly I'll do the same thing here for .fadeOut. And, Fade In and Fade Out do essentially what you'd expect them to do. So, let's go ahead and save and jump over to the browser and let's refresh. When I click on Fade Out you can see it fades out and then it's no longer in the layout calculation, and when I click on Fade In, the element fades in. So, let's go back to the code and let's put in some parameters for those Fade In and Fade Out functions. For Fade In, I'm…

Contents