Hello,

I've been using Jquery for a while and I just downloaded jQuery UI, to
try and use some of the effects. I want to bounce and object that is
centered using margin: 0 auto. When The effect is run, the element
moves "jumps" to the left hand side of the container and then bounces.
After it is done bouncing it returns to the center.

Code:

 #container {
                background: #ccc;
                width: 800px;
                height: 600px;
                margin: 0 auto;
                position: relative;
}

 #joint {
                width: 400px;
                height: auto;
                background: #cc3300;
                text-align: center;
                padding: 0;
                position: relative;
                top: 350px;
        display:block;
}

In a dom ready :

$('#joint').css("top","-50px").animate({
                                top:'350px'},1000,function(){
                                        $(this).effect('bounce');
                        });

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to