[Theme: P2] Fix .newcomment transparency animation
-
New comments loaded via ajax are animated to have a transparent background, with a callback to remove the “newcomment” class when the animation is complete. There are two issues with the current code:
1. The current version of jquery-color cannot animate background-color to transparent, it simply animates to white.
2. The callback does not fire, because the function parameters are not passed in a supported way. (If the second parameter is the options object, subsequent parameters are ignored.)This patch fixes the callback passing and removes the white background-color when the fade is complete. Themes which have customized CSS will still see a strange transition to white, but it won’t persist. This animation bug is fixed in a newer release of jquery-color, which could be bundled with P2.
Patch: https://gist.github.com/1601019
jQuery.animate() option parsing: https://github.com/jquery/jquery/blob/master/src/effects.js#L368
jQuery Color: https://github.com/jquery/jquery-color
- The topic ‘[Theme: P2] Fix .newcomment transparency animation’ is closed to new replies.