I have a div wich is scrollable horizontally. I want to know when I reach the end of it.
Is there is simple way to detect if the horizontal scrollbar is scrollable to one direction or the other?
I have a div wich is scrollable horizontally. I want to know when I reach the end of it.
Is there is simple way to detect if the horizontal scrollbar is scrollable to one direction or the other?
To check the horizontal scrollbar you need to use
var scrollLeft = $('#div_id').scrollLeft();
You can then check if it's equal to the $('#div_id').width() and there's the end.