**Possible values:**
- Milliseconds (e.g., `400`, `1000`)
- `"slow"`
- `"fast"`
**Possible values:**
- `"swing"` - Slower at the beginning and end, faster in the middle
- `"linear"` - Constant speed throughout the animation
` elements when a button is clicked: ```javascript $("button").click(function(){ $("p").fadeIn(); }); ``` #### 2. Using the `speed` Parameter Control how fast the elements fade in by passing different speed values: ```javascript $("button").click(function(){ $("#div1").fadeIn(); // Default speed $("#div2").fadeIn("slow"); // Slow preset $("#div3").fadeIn(3000); // Custom duration (3 seconds) }); ``` #### 3. Using the `callback` Parameter Execute a function immediately after the fade-in animation completes: ```javascript $("button").click(function(){ $("p").fadeIn("slow", function(){ alert("The fade-in animation is complete!"); }); }); ``` --- ### Considerations * **Initial State:** The `fadeIn()` method only works on elements that are currently hidden (e.g., elements with `display: none` or those hidden via `.hide()`). If an element is already fully visible, calling `fadeIn()` will have no visible effect. * **Animation Queue:** Like other jQuery effect methods, `fadeIn()` is added to the element's animation queue. If multiple animations are called consecutively, they will run one after another.
YouTip