Hey this is a very old topic and I think I have forgot to answer. This is just for everybody seeing this topic later on.
Please use this code:
<script>
window.laytheme.on('newpageshown', function(){
if(window.location.hash.length > 0){
var id = window.location.hash;
if(jQuery(id).length > 0){
jQuery('html, body').animate(
{ scrollTop: jQuery(id).offset().top },
{ duration: 1200 });
}
}
});
</script>
Find the full explanation here:
http://laythemeforum.com:4567/topic/2863/link-to-anchor-from-another-page/4
I think the reason why with your code it didn't animate is maybe because the easing "easeOutSine" doesn't exist.
Also the above code is better cause it will work on any page.