Plasticated
Plasticated

Reputation: 141

Trying to achieve this animation effect in jQuery

I'm trying to achieve an effect like the one on this page (click the submit button).

http://www.thewildtimes.com

The modal drops down from the top of the page. I think it's a jQuery easing effect, but I am a little baffled by all the options.

How can I do this?

Upvotes: 2

Views: 67

Answers (1)

Nick Craver
Nick Craver

Reputation: 630409

The easing they're using is called easeOutBack, it really just boils down to this:

.animate({
   left  : ( ($(document).width() - this.options.BoxStyles.width) / 2),
   top   : ( $(document).scrollTop() + ($(window).height() - this.Box.outerHeight()) / 2 )
 }, {
    duration  : this.options.moveDuration,
    easing    : 'easeOutBack'
 });

Here's their effect packed up in a stand-alone demo to show it a bit better.

Upvotes: 1

Related Questions