Search code examples
javascriptcsswebkit

difference between null string and none


I have the following script:

document.querySelector(".img-man").style.webkitAnimation = "";

Which was working on safari 5.1.7 but not on 7.0.2.

Later I changed to this:

document.querySelector(".img-man").style.webkitAnimation = "none";

Which is working fine now.

So, I'm curious to know the difference between "" and "none"


Solution

  • Setting the property to "none" explicitly disables animation.

    Link