How to realize accordion special effects in jquery
This article introduces the relevant knowledge of "how to realize accordion special effects in jquery". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Effect:
Examples are as follows:
Title *{padding: 0px;margin: 0px;} li{ width: 80px;height:300px; float: left;overflow: hidden; list-style: none; } $(function () { $("ul li").mouseover(function (){ $(this).stop().animate({width:350},500)//stop function: stops the currently running animation //siblings: traverse $(this).siblings().stop().animate({width:80},500)//anmate: 500ms later change its width to 80px; }) })
"How to achieve accordion effects in jquery" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!