Using Jquery, how to I find out if an element is overflowing its container ?
<div style="overflow:hidden"><label>My really really long label</label></div>
I would like to know when the text of the label is being cutoff so that I can act on it.
Thank you
You could use the width function to check if the
<label>is longer than the<div>:Here’s a simple example.