Skip to content

Instantly share code, notes, and snippets.

@donabrams
Created July 16, 2012 20:51
Show Gist options
  • Select an option

  • Save donabrams/3124958 to your computer and use it in GitHub Desktop.

Select an option

Save donabrams/3124958 to your computer and use it in GitHub Desktop.
jquery plugin to detect overflow
$.fn.hasHiddenOverflow = function() {
var el = this.first()[0];
console.log(el);
return el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment