I need some javascript that will extract an anchor ('hashtag' in the case below) from the page's url and autoscroll to the tag with that name.
Here's an example url: www.somelink.com/post1/#hashtag
I tried putting the url in an anchor tag like this;
<a name="hashtag" href="www.somelink.com/post1/#hashtag">
and it works fine. But I want to mimic that functionality in code.
I tried doing it in jQuery, but there I need to have an id
defined.
I searched the forum but i couldn't find what I was looking for.