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');
});