Key Concepts

Review core concepts you need to learn to master this subject

jquery fadeIn effect method

// The '#menu' element will gradually appear // on the page when the '#menu-button' is clicked. $('#menu-button').on('click', () => { // equivalent to $('#menu').fadeIn(400, 'swing') $('#menu').fadeIn(); });

The jQuery .fadeIn() effect method causes a hidden element to gradually appear on the page. The method takes optional parameters.

The first optional parameter specifies the duration of the fading effect. The default value is 400 milliseconds.

The second parameter specifies the name of an “easing” function that determines the speed of the fading effect at different points in the animation. The default value is ‘swing’, where the fade-in effect is slower at the beginning/end and faster in the middle.

Learn jQuery: Effects
Lesson 1 of 1
  1. 1
    jQuery Effects are a group of methods in the jQuery library that are responsible for adding dynamic behavior to websites. You may have seen many of these effects on modern websites without even rea…
  2. 2
    The first tool you will add to your jQuery effects tool belt is the .hide() method. When you hide an element, your browser will render the HTML as if the hidden element does not exist. It will disa…
  3. 3
    Now that we’ve learned how to hide elements on our page, we want to know how to make them reappear. Luckily, the .show() method does the opposite of .hide(). If an element on your page is hidden, …
  4. 4
    Great work! Our table now has two buttons that hide and show our image. But wouldn’t it be nice to have one button do both? It is common for web pages to have one button that will either hide or sh…
  5. 5
    Great work! In this exercise, you will learn about two new methods that are similar to .hide() and .show(). Take a look at the gif below: In this gif, the .fadeIn() method is called on an HTM…
  6. 6
    Great work! With fade, our website is starting to look dynamic. .fadeToggle() is the third and final method in this trio of fade methods. This method is similar to .toggle(). If you call .fadeToggl…
  7. 7
    Have you ever been to a website and seen HTML elements slide into place? Many websites use this effect to show menus; you click on your profile image and a menu slides down revealing different sett…
  8. 8
    Wow! You’ve completed this table of 9 different jQuery effects. Great job! To review, the methods that we learned were: * .hide() * .show() * .toggle() These methods instantly hide or show eleme…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo