js scroll to id
snippet in javascript

js scroll to id

user941

// Js
document.getElementById('id').scrollIntoView();

// JQuery
$('#id')[0].scrollIntoView();