Jump to content

The limits of jquery


Shadowing
 Share

Recommended Posts

Hey guys im having a problem while moving a object accross the screen and trying to make it hide() while its still moving. if you look at my page below it will get you a some what idea of what im doing.the problem is im wanting to blow something up while its moving and im having problems doing this. one problem is while using jquery animation i cant tell a element what to do until the animation is done with that element. another thing i hate how jquery animation slows down right before stoping. Im assuming thats jquery doing that? because im trying to blow up a fast moving ship i cant have it be slowing down to a stop then blow up. My home page isnt showing the faster ships im working on atm but will still give you an idea what im doing. would really appreciate some help im at a halt now. http://www.stargatesystemlords.com

$('.'+tag)[effect](0,function(){  	$(this).animate({'margin-left': '+='+left ,'margin-top': '+='+top , 'width': '+='+width ,'height': '+='+height}, +speed);  });

Edited by Shadowing
Link to comment
Share on other sites

for the speed to be constant, not speed up and slow at end you would use "linear" after duration

$('.'+tag)[effect](0,function(){          $(this).animate({'margin-left': '+='+left ,'margin-top': '+='+top , 'width': '+='+width ,'height': '+='+height}, +speed, 'linear');  });

Link to comment
Share on other sites

dsonesuk thats amazing thanks alot. I didnt even know that parameter existed loland now i see there is even a plugin for that to extend it even more. course i think i only really have use for is linear and swing

Edited by Shadowing
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...