I\'m using the .resize() function to detect window re-size events, but this detects both height and width changes.
.resize()
Is there any way to detect ju
var width = $(window).width(); $(window).on('resize', function() { if ($(this).width() !== width) { width = $(this).width(); console.log(width); } });