I have done the following code in JavaScript to put focus on the particular element (branch1 is a element),
document.location.href=\"#branch1\";
Use
$(window).scrollTop()
It'll scroll the window to the item.
var scrollPos = $("#branch1").offset().top; $(window).scrollTop(scrollPos);