I just noticed that the jquery resize event fires twice any time the browser window is resized. I\'m unable to find any documentation listing this as the default behavior. I
This problem seems not to be tied neither jquery nor browser implementation. In fact if you run the second function which is javascript pure function the glitch occur too. A possible solution is, get out into a separate window the DevTools docker doing so most of the times you will not get double fire the resize event. I though that was because when the window resize, the Devtool docker resize too and triggered the resize event but it is not conclusive apparently. You can try this code without console.log.