Chalarangelo/30-seconds-of-code

Scroll page by JS { with out giving href }

SushanthReddyManda opened this issue · 1 comments

I wanted to add JS function(s) to scroll the page / go to a particular location .
As giving this:-

<a href= "#some-id"> .....  </a>


<div  id="some-id"> ....... </div>

is a bit time taking , and changes the base link as well .
To remove such thinks I came up with this idea .

Hope to hear from u soon .

This is a language feature - Window.scrollTo() - so it's not worth implementing a snippet that replicates this behavior.