轻松水平滑动div

编程入门 行业动态 更新时间:2024-10-27 07:17:46
本文介绍了轻松水平滑动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

本文发布于:2023-11-27 20:51:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1639556.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:水平   轻松   div

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!