made animations work through browser events