event listener that resize the width jquery code example Example: resize js window.addEventListener('resize', function(event){ // do stuff here });