convert a jQuery code to a pure JavaScript -


i'm trying convert jquery code pure javascript , i'm stuck @ :

    $(window).on({       resize: somefunction,       scroll: someotherfunction     }).trigger("resize").trigger("scroll") 

any hints ?

adding event handlers can done follows:

window.onresize = somefunction; document.body.onscroll = someotherfunction; 

triggering events little more complex. can see jquery source trigger() on github


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -