In jQuery, is it possible to somehow “bind” an action to both the ready function and a resize event? I’m trying to add/remove classes on resize and I want the initial class state to be there on ready.
In jQuery, is it possible to somehow bind an action to both the ready
Share
The easiest way to do this is to trigger the
resizeevent immediately after binding it: