1

I want to understand how a particular JQuery effect was implemented. On this design company's website, pictures of tablets and people "pop up" when you reach the "About Us" and "The Team" sections. How can I recreate the effect?

I tried to copy-paste the jquery code from the page but couldn't get it to work work. Can someone please tell me what I'm missing?

jQuery('.animated').appear();
jQuery(document.body).on('appear', '.slide', function () {
    jQuery(this).each(function () {
        jQuery(this).addClass('ae-animation-slide')
    });
});

Here is the full code in JSFiddle

1 Answer 1

1

Firstly it seems no DOM is not ready. Use $(document).ready() to tell JQuery to wait until the page is finished loading to run JavaScript:

$(document).ready(function () {
    //put codes in here.
})

I tried your JSFiddle but it seems not showing the image, if you update JSFiddle I can look into again.

Try this updated Fiddle

http://jsfiddle.net/RcvWM/3/

I added webkit css and loaded the jQuery Appear plugin. Make sure you have that included.

.ae-animation-slide {
    -webkit-animation-name: ae-animation-slide;
    // etc
}
Sign up to request clarification or add additional context in comments.

2 Comments

jsfiddle.net/RcvWM/2 update! im pretty bad at jquery! Anyway i have update the image if possible i want that the jquery put the "ae-animation-slide" into the img class so when someone visit the page become visible in the browser view port with a nice CSS3 transition effect.
yet in JSFiddle work perfect i gonna try later to put into my website! Ty a lot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.