Let’s say there is a list of points written in a particular space of a webpage. Now the webpage is really long and if you dare to read it, you’ll even forget the fact that those points ever existed and were reminded by a reference in some other part of a webpage.The same part( the place the list of points were written) was being referenced a lot in other parts, so a thought struck my mind. If I could find the specific part in just a click whenver I wanted to, I would save a lot of time scrolling around. Is there a shortcut in chrome browser for this?
I did’nt try anything yet.
2
Answers
You should use this platform as a means to help solve an issue you’re having. But, a general guideline for you:
All the points of the page you want to scroll to via click of a link or button or whatever else, put it in a div.
Then, using javascript you can tell it to run a function whenever you click your button, link etc… to scroll until the div with id "BulletPoints1" or whatever you call it is in view of the viewport.
Be sure to label each div with a UNIQUE id so it knows which section you are referring to.
Hope this helps.
You can do this using either:
<a name="nav_galah"/>
id
attribute eg<h2 class="pageheader__content__heading" id="top_cockatoo">level 2 heading</h2>
, as mentioned by j06891 aboveYou can then link to them using
#
, either within the current page eg<a href="#nav_galah">Jump to Galah</a>
, or from another page eg<a href="prize_parrots.htm#top_cockatoo">the Top Cockatoo</a>
.