Jquery fade-in, fade-out event fadein fadeout
1. The fadein () method uses the fade-in effect to display the selected element (this element is hidden)
$(selector).fadeIn(speed,callback)
Parameter descriptionSpeed,Optional. Specifies the speed at which elements are hidden to be visible. The default value is "normal ". Possible value: Millisecond (for example, 1500) "slow" "normal" "fast"
Callback, optional. The function to be executed after the fadein function is executed. (This parameter cannot be set unless the speed parameter is set)
2. fadeout ()
Fadeout (speed, [callback]) fades out all matching elements by changing the opacity, and triggers a callback function after the animation is complete.
This animation only adjusts the opacity of the element, that is, the height and width of all matched elements do not change.
A string ("slow", "normal", or "fast") with one of the three predefined speeds or a millisecond value (for example, 1000) indicating the animation duration)
3. Bug about invalid fadein and fadeout methods of jquery in IE
Bug1: absolute positioning nesting absolute positioning
After the solution is changed to floating, the fade-out effect can be achieved.
Bug2: parent-level absolute positioning of nested pictures larger than parent-level size
Adjust the size.
Bug3: IE6 IE7 IE8 fadein () fadeout () Bug at position: relative
If the child element of the fadein element has the position attribute, the element with the relative value as the most serious position attribute will not have the fadein effect!
Solution: change the position attribute to relative dynamically before fadein (). This will solve this bug in IE7.
Watermark ('.fadein').css ('position', 'relative '). fadein ();
Add filter: Inherit to the element whose child element has the position attribute. Add the first child element of the current element. These two problems are solved by combining ie678.
. Relative {position: relative; filter: Inherit}
Reference: http://www.cnblogs.com/lxiang/archive/2012/05/07/2482530.html