The error message I am getting is Cannot read property 'scrollHeight' of null: var b = document.getElementById('chat-messages'); b.scrollTop = b.scrollHeight; var lst = b.scro
Solution 1:
Correct ways in jQuery are -
$('#chat-messages').prop('scrollHeight') OR
$('#chat-messages')[0].scrollHeight
Hope it helps.
Share
Post a Comment
for "Cannot Read Property 'scrollheight' Of Null"
Post a Comment for "Cannot Read Property 'scrollheight' Of Null"