本文介绍了轻松水平滑动div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一种隐藏/显示div的功能,在该位置上单击鼠标可以显示div,但以从左到右的方式滑动并保持缓和.
I am looking to achieve a hide/show div where on mouse enter the div is shown but in a sliding left to right manner with easing.
我还需要页面集中显示刚刚滑出/显示为新的div.
Also i need the page to focus on the new div that just slided out / made visible.
这是我的剧本.
关于我需要添加什么的任何想法?
Any ideas on what i need to add?
<script>$("#box0").mouseenter(function () { $("#lSection2").show('slide').delay(5000); $("#boxContent0").slideDown(3000); $("#boxContent0").focus(); }); $('#boxContent0').mouseleave(function() { $("#boxContent0").fadeOut(1000); $("#lSection2").fadeOut(1000); });</script> <div class="AdBox" id="box0">mouse over or click to view details</div> <div id="lSection2" style="display:none;"><div id="boxContent0" style="display:none;" class="boxContent"> <div align="left" style="">Win Big<br /> - Ipad<br /> - Holiday<br /> - 1 Year Spa Treatments</div> <div></div>推荐答案
$(element).show('slide', { direction: 'left' }, 1000); $(element).hide('slide', { direction: 'left' }, 1000);
docs.jquery/UI/Effects/Slide
更多推荐
轻松水平滑动div
发布评论