[webkit-help] Adding animations via JavaScript?

digital wave / Reiner Pittinger rp at digital-wave.de
Tue Sep 21 00:01:48 PDT 2010

I recently tried to add styles with "-webkit-animation" and "@-webkit-keyframes" definitions to the page after it has been loaded.

The call was something like:

	$("style#animation-styles").text("#element { -webkit-animation-name: ani-1; ... }");

Unfortunately, nothing happened.

Must (keyframe) animations be defined in the CSS when the page is being loaded - or can you add them dynamically afterwards?

Best regards,


More information about the webkit-help mailing list