jquery - Javascript animation with -


i'm attempting items animate 1 location new 1 on click of appropriate button. though used fixed positions , have javascript set location before animation, things still go off page before end point.

firefox , webkit browsers have had different errors on , off , can't find solid solution this, me out this?

$(function(){     $("#nav li").click(function() {         $("#nav").css({             'left' : $(this).position().left + 'px',             'top' : $(this).position().top + 'px'         })         .animate({              'margin-top' : '-175px',               'margin-left' : '0px',             'left' : '10px',             'top' : '50%',             'height' : '370px',             'width' : '70px'         }, 500, 'swing');          $("#name").css({             'top': $(this).position().top + 'px'         })         .animate({             'top' : '100px'         } , 500, 'swing');     });      $("#buttona").click(function() {         $("#a").animate({             'opacity' : '1' ,             'top' : '50%',              'margin-top' : '-200px'             }, 500, 'swing');     });  }); 

http://coreytegeler.com/jg/

your use of #nav li#a , .set#a worries me. ids must unique, never makes sense use more id in selector. cause of animation issues.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -