Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery detect if element has overflow

if ($("#myoverflowingelement").prop('scrollWidth') > $("#myoverflowingelement").width() ) {
	//this element is overflowing on the x axis
}

if ($("#myoverflowingelement").prop('scrollHeight') > $("#myoverflowingelement").height() ) {
	//this element is overflowing on the y axis
}
 
PREVIOUS NEXT
Tagged: #jquery #detect #element #overflow
ADD COMMENT
Topic
Name
8+8 =