change screen width event code example
Example 1: javascript on screen width change
$(window).resize(function() {
/* Do shit */
console.log('window was resized');
});
Example 2: add event listener on width screen resize
window.addEventListener('resize', reportWindowSize);