I have done the following code in JavaScript to put focus on the particular element (branch1 is a element),
document.location.href=\"#branch1\";
You can extend jQuery functionalities like this:
jQuery.fn.extend({ scrollToMe: function () { var x = jQuery(this).offset().top - 100; jQuery('html,body').animate({scrollTop: x}, 500); }});
and then:
$('...').scrollToMe();
easy ;-)