ryeguy
ryeguy

Reputation: 66851

Div class cleared during Jquery effects?

I have a div that I want to apply a bounce effect to. It's class gives it some left padding to center it on the page.

After examining what happens during the effect with Firebug, it seems that it adds an effect wrapper class and removes my original class. This causes the div to move from the center of the screen, to the left of the screen (padding removed), it bounces, and then it moves back because the class is reapplied. Is there anyway to stop this from happening?

Upvotes: 0

Views: 324

Answers (1)

geowa4
geowa4

Reputation: 41813

Wrap the bouncing div in another div that has the class used for centering.

Upvotes: 1

Related Questions