Home >Web Front-end >JS Tutorial >Example of Jquery implementing bottom-up expansion effect_jquery

Example of Jquery implementing bottom-up expansion effect_jquery

WBOY
WBOYOriginal
2016-05-16 16:28:331524browse

The common downward expansion effect is very simple, just use slideUp and slideDown.
If the div to be expanded is positioned absolutely through position:absolute, and through relative and bottom positioning, such as bottom:0px, calling slideDown at this time will expand it upward.

(Because slideDown, to put it bluntly, dynamically changes the height of the element, the bottom positioning is fixed, and it expands upward when the height becomes higher)

Copy code The code is as follows:

//High-quality recommendations
$('.remm_product ul li').hover(
function(){
$(this).find('.p_info').slideDown();
},
function(){
$(this).find('.p_info').slideUp();
}
)
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn