Use CSS to make a dummy link for javascript
When most people want to execute javascript from a piece of text they usually use the tag. But they dont want the link to go anywhere so they use a the number symbol # in the href attribute to specify that nothing happens when it’s clicked. That is what in some web applications you will notice the address bar contains a number symbol # at the end ie. portlandwebdev.com/here.php#. This is the improper use of the anchor functionality and if you have a page that scrolls vertically you will notice some unexpected scrolling or jumping when clicking on links that have number symbol # hrefs specified. Instead of trying to get a pointer using this buggy technique, just use css to force the cursor on mouseover.
-
-
.link:hover {
-
cursor:pointer;
-
}
-
-
-
<a class="link">link</a>
-
<span class="link">link</span>
-
Both of these elements will product the text “link” where the mouse pointer for links will appear.