Slide div horizontally with easing
14,186
$(element).show('slide', { direction: 'left' }, 1000);
$(element).hide('slide', { direction: 'left' }, 1000);
http://docs.jquery.com/UI/Effects/Slide
Author by
Eno Bassey
Updated on June 04, 2022Comments
-
Eno Bassey almost 2 years
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.
Also i need the page to focus on the new div that just slided out / made visible.
Here is my script.
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>