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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.