Get Set Scroll Height for elements using jQuery
Get or Set Scroll Height for div using jQuery
Using jqueryfunction scroll_to_bottom(){
var objDiv = $("#divExample");
var iScrollHeight = objDiv.prop("scrollHeight");
objDiv.prop("scrollTop",iScrollHeight);
}
Using Javascript
function scroll_to_bottom(){
var objDiv = document.getElementById("divExample");
objDiv.scrollTop = objDiv.scrollHeight;
}
Get Set Scroll Height for elements using jQuery
Reviewed by Bhaumik Patel
on
6:37 PM
Rating: