Trying to achieve DIV jQuery UI slide effect cuts off part of div while transitioning -
i saw effect , liked it. here js fiddle link of effect http://jsfiddle.net/lookitstony/edsp4/
so try achieve same @ end not working mine. have main div called mainslidediv
, main div has 2 other div "dvups_label" & "ups_rate_time"
. trying achieve same effect slide effect cuts off part of div mine not working.
here small js code.
function transitionpage() { // hide left / show left $('.ups_label').toggle("slide", { direction: "left" }, 500); // show right / hide right $('.ups_rate_time').toggle("slide", { direction: "right" }, 500); } $(document).ready(function () { //$('#page1').click(transitionpage); //$('#page2').click(transitionpage); $('#btntst').toggle( function () { $('.ups_label').click(transitionpage); }, function () { $('.ups_rate_time').click(transitionpage); } ); });
my full code html,css & js huge. not posting full code here rather put js fiddle link here http://jsfiddle.net/tridip/4289a009/ here 1 can see full code , guide me mistake made code not working expected.
so please please check js fiddle link given @ top , can understand kind of output want , see js fiddle link @ bottom , guide me why code not working. thanks
you need change
<div class="ups_rate_time">
to
<div class="ups_rate_time nodisplay">
and js should this
function transitionpage() { // hide left / show left $('.ups_label').toggle("slide", { direction: "left" }, 500); // show right / hide right $('.ups_rate_time').toggle("slide", { direction: "right" }, 500); } $(document).ready(function () { $('.ups_label').click(transitionpage); $('.ups_rate_time').click(transitionpage); //$('any class or id want use toggle element').click(transitionpage); });
Comments
Post a Comment