Event handler 
ie8+ & modern browser