jquery - Slide Div In and Out at the same time -


i trying create effect such when link clicked div on page slides out left, , linked div slides in left : http://templates.entheosweb.com/template_number/live_demo.asp?templateid=38272

can please me on this?

as @seamirra said, try use callback function of .animate(). check fiddle: http://jsfiddle.net/ykbgt/5677/

 $('.button a').click(function(e) {      e.preventdefault();      var tg = $(this).attr('href');      tg = tg.substr(1, tg.length); /* target id */      $('.current').animate({'left' : '-50%'}, 500, function(){          $('.current').removeclass('current');          $('#' + tg).addclass('current').animate({'left' : '50%'}, 500);      }); }); 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -