jquery color animation throws Invalid property value intermittently

前端 未结 8 1704
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 11:50

I\'m trying to animate the background for an ASP.Net hyperlink to do a yellow fade on an update panels refresh. So far it works almost all of the time, but occasionally a j

相关标签:
8条回答
  • 2020-12-29 12:25

    I think I ran into the same problem as you on another project; I had a DIV inside of another DIV (which didn't have it's background explicitly defined.) I was trying to "flash" the background color of the inner DIV and was running into that error. Only after I assigned a specific color to the container DIV did the error go away.

    0 讨论(0)
  • 2020-12-29 12:27

    For those having this issue with the jQuery color plugin, a good enough hack is to change

    if ( fx.state == 0 ) {
    

    to something low like

    if ( fx.state <= 0.045 ) {
    

    Oddly enough fx.state is not always 0, which is why the invalid property error gets thrown occasionally.

    0 讨论(0)
提交回复
热议问题