Meteor anckor tags did not work with using IronRouter


#1

Hi, everyone.
I have a little trouble with using anchor tags in meteor.
I know that they must using with router or {{pathFor:"" …}} value.

I just try to scroll page to tag on top

<a id='newsfeedtop'></a>

from event

 Router.go('dashboard', {}, {
        hash: 'newsfeedtop',
      });

then router change toute to http://localhost:3000/#newsfeedtop
but the page did not scrol to the tag.

Any body know what is the reason of this problem? Thanks.


#2

I think you want <a name="newsfeedtop"></a> when defining your anchor.


#3

I try each of

 <a name="newsfeedtop"></a>
  <a id='newsfeedtop'></a>

but it still did not work for me


#4

It was resolved and works good.
The problem was occured because I using
$('html, body')
instead
$('#wrapper').animate({ scrollTop: 200 }, 600);