we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "jquery detect if element has overflow"
Angelo
28 Jan 2019
1if ($("#myoverflowingelement").prop('scrollWidth') > $("#myoverflowingelement").width() ) {
2	//this element is overflowing on the x axis
3}
4
5if ($("#myoverflowingelement").prop('scrollHeight') > $("#myoverflowingelement").height() ) {
6	//this element is overflowing on the y axis
7}