Checks whether an element has horizontal overflow.
Element to inspect.
true when scrollWidth exceeds clientWidth.
true
scrollWidth
clientWidth
hasScrollX(el); // true when el.scrollWidth > el.clientWidth Copy
hasScrollX(el); // true when el.scrollWidth > el.clientWidth
Checks whether an element has horizontal overflow.