I have a div which is scrollable using the overflow-y
set to auto. What I want to do is that beneath this div
I like to have a simple button which is disabled
and I like it to be enabled
after I reached the bottom of the div
.
Can this be achieved?
Asked
Active
Viewed 42 times
0
-
1"A picture says more than thousand words." Can you post a link to jsfiddle example or post your source code? – Reporter Apr 29 '13 at 09:31
-
are you trying to say you want to have a **Back to top-button**? or **Top of page-button** ? – Þaw Apr 29 '13 at 09:39
-
1@Paw Cabelin, sounds more like "I have read and I accept the rules"... – linepogl Apr 29 '13 at 09:43
1 Answers
1
try this with jquery:
$("#idDiv").scroll( function() {
if($(this)[0].scrollHeight - $(this).scrollTop() == $(this).outerHeight())
// what you want to do ...
$('#idButton').removeAttr('disabled');
}
}
see this : javascript: detect scroll end