Mudança da largura da janela do JS
window.addEventListener('resize', functionName);
Strange Snake
window.addEventListener('resize', functionName);
function resize() {
console.log("height: ", window.innerHeight, "px");
console.log("width: ", window.innerWidth, "px");
}
window.onresize = resize;
$(window).resize(function() {
/* Do shit */
console.log('window was resized');
});