Last Updated: September 29, 2021
· ivanca

jQuery Event to execute a callback *right now*

Sometimes whe want to execute something now AND when an event happens; the most common way this happens is in resize events, so instead of doing this:


We can do this:

$(window).on('now resize', fixSize);

To be able to do this just add this lines after loading jQuery: = {
     setup: function(a, b, cb) {
          var self = this;
          setTimeout(function (argument) {