Jamie
Jamie

Reputation: 2081

jQuery or Javascript animation

I'm just beginning learning javascript and jQuery and need some help. I am trying to get a picture to start at the bottom of the page (of the viewers window) and animate or slide (or any other effect - I am not too knowledgable at this point) diagonally across the page to the top...

The example is a spider diagonally going to the top of the page. Any idea of what type of javascript/jQuery function I can use. Any help would be super appreciated. Thanks!

Upvotes: 1

Views: 240

Answers (1)

zzzzBov
zzzzBov

Reputation: 179256

Look at the animate function.

Could be as simple as:

$('img').animate({'left': '+=500px', 'top': '-=500px'});

Upvotes: 2

Related Questions