I know how to animate scroll on a link on the same page. I know also how to jquery page scroll from an external page. The problem is that I need to use the same hash link to animate from an external page and internal page as well.
Let me explain further
Suppose I have three links,
Link A Link B-1 Link B-2
and link B-1 and B-2 are on the same page and in succeeding divs. I'm currently in Link A and when I click Link B-2, it should go to the page where Links B-1 and B-2 are and animate scroll to the area where Link B-2 is. If I click Link B-1 while on the same page, it should animate scroll back to the top.
Same thing should happen if I was on Link A's page and I clicked on B-1, it should go to the page where B-1 and B-2 is and animate scroll into B-1's section. If I click B-2 on the same page, it should animate scroll into that section.
Does this make sense? Can anyone help me with this please? Thank you