I\'m using the .resize() function to detect window re-size events, but this detects both height and width changes.
Is there any way to detect ju
One can also use this tiny jQuery plugin for this: https://github.com/adjohnson916/jquery-resize-dimension
Keeps your own code more readable:
ResizeDimension.bind('width');
$(window).on('resize-width', function () {
console.log('resize-width event');
});
or just:
$(window).resizeDimension('width', function () {
console.log('resize-width event');
});