You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of the links in your demos are pointing to href="#", which has the unwanted (but totally correct) side effect of skipping up to the very top of the page when clicked.
By simply pointing these hrefs to #0 instead, we can remove this behaviour. Because IDs seldom start with a number, we know that id="0" is highly unlikely to appear in our DOM; this means that if we click a link referencing it, nothing will (or can) happen, and we just stay where we are.
A lot of the links in your demos are pointing to
href="#"
, which has the unwanted (but totally correct) side effect of skipping up to the very top of the page when clicked.By simply pointing these
href
s to#0
instead, we can remove this behaviour. Because IDs seldom start with a number, we know thatid="0"
is highly unlikely to appear in our DOM; this means that if we click a link referencing it, nothing will (or can) happen, and we just stay where we are.Here’s a little demo: https://jsfiddle.net/atwnxo8L/
The text was updated successfully, but these errors were encountered: