nnattawat / flip

A lightweight jQuery plugin to make 3D card flipping animation
Other
627 stars 312 forks source link

Reduce scope of CSS transition: #22

Closed jeshuamaxey closed 8 years ago

jeshuamaxey commented 9 years ago

I found that when I dynamically set a property of either .front or .back (in my case the background image and position), these would be animated on page load which I did not want. I traced the cause to this line in the source. The CSS transition is set for all properties on both divs.

This pull request reduces the scope of that transition to only the properties the library is concerned with animating. The rest is left for the user to style and animate as they wish.

JemarJones commented 9 years ago

Could you show the issue in a jsfiddle and also one for your solution?

Download commented 9 years ago

I have been wrestling with the animation running on page load as well when I implemented the dynamic size...

@jeshuamaxey Could you please try the latest version? I think it might be fixed... If not, could you have a look and see if your fix still applies to the new version? I will be happy to merge it in.