Support » Themes and Templates » [Theme: P2] Fix .newcomment transparency animation

[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


Viewing 4 replies - 1 through 4 (of 4 total)
  • Thanks much for the bug report and the patch. We’ll work on it soon.



    Thanks for the patch! I added the .diff changes to my p2.js file, but wasn’t able to get it working. What other steps am I missing?



    Same issue as Astromono… Love to see someone get this fixed.

    The diff is 8 months old, so it’s likely out of date with the current release of P2. Not sure I’ll have any opportunity to fix it in the immediate future.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Theme: P2] Fix .newcomment transparency animation’ is closed to new replies.