Get Set Scroll Height for elements using jQuery

Get or Set Scroll Height for div using jQuery

Using jquery
function 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 Get Set Scroll Height for elements using jQuery Reviewed by Unknown on 6:37 PM Rating: 5