are you looking to extract the hashtag from the url first, then go to that part in the page?
like this?;
$(document).ready(function(){
var tag = window.url.split('#');
tag = tag[tag.length - 1];
$('html, body').animate({
scrollTop: $("[name='" + tag + "']").offset().top
},10);
});