Should all jQuery events be bound to
$(document)
?
Script to determine which elements are creating a horizontal overflow (creating an unnecessary scrollbar)
var all = document.getElementsByTagName("*"), i = 0, rect, docWidth = document.documentElement.offsetWidth;
for (; i < all.length; i++) {
rect = all[i].getBoundingClientRect();
if (rect.right > docWidth || rect.left < 0){
console.log(all[i]);
}
}
https://hackernoon.com/getting-to-grips-with-es6-arrow-functions-ebfa62c5c5d6