Reputation: 1415
I'd like to apply this filter:
-webkit-filter: blur();
dynamically via JavaScript.
I looked everywhere online, and I couldn't find almost anything.
I would like to set the property dynamically through JavaScript via the DOM.
document.getElementById("element").style
How would I go about this?
Upvotes: 21
Views: 26078
Reputation: 145388
As simple as:
document.getElementById("element").style.webkitFilter = "blur(1px)";
Upvotes: 31