2

For whatever reason I cannot get the easing to work on some images. The browser just loads them instantly without easing.

What I'm trying to accomplish is so that the side images slide from the bottom to it's position and the middle image slides from the top.

http://jsfiddle.net/DPX9G/1/

$(document).ready(function() {
            $('.banner1 img, .banner3 img').animate({bottom:"0"}, '1000', 'easeOutBack');
            $('.banner2 img').animate({top:"0"}, '1000', 'easeOutBack')
        });

Any help would greatly be appreciated.

3 Answers3

0

Try changing $(document).ready to

$(window).load

$(document).ready fires before the images load and are accessible

Maibock
  • 1
  • 1
0

I see you've used inline styles. If you do not have other CSS that sets the image's position to absolute or relative, you will not be able to animate it. Try:

<img src="images/banner1.jpg" alt="" style="bottom: 0px; position: relative;">
Maibock
  • 1
  • 1
0

Figured it out!

http://jsfiddle.net/DPX9G/4/

I had to set the inline style on the banner images to negative values for it to transition.

style="bottom:-100%;"
style="top:-100%;"
style="bottom:-100%;"