Skip to content

Instantly share code, notes, and snippets.

@ilhamgusti
Created March 31, 2021 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilhamgusti/eeca1649c02728598173ce9a7c2877c2 to your computer and use it in GitHub Desktop.
Save ilhamgusti/eeca1649c02728598173ce9a7c2877c2 to your computer and use it in GitHub Desktop.
detect if element is overflow width (can check if element state is scrollable or not)
function isOverflowingElement(element) {
return (element.scrollWidth > element.offsetWidth);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment