I am creating a list of anchor tags from a MySQL/PHP query; the anchor tags call a JavaScript function.
The ‘catch 22’ that I have is:
href="#"makes the page jump to the top every time one of the anchor tags is clicked (very annoying)- removing
href="#"means that the cursor does not change as an anchor tag is hovered over nor does that anchor tag have the appearance of an anchor tag.
I know there is a way to handle this with JavaScript (possibly jQuery) but I don’t recall how at the moment. However, I really prefer a simpler HTML fix (if one exists) that does not require me to get into JavaScript.
Edit:
"does not require me to get into JavaScript" == "does not require extensive changes in JavaScript."
A simpler HTML fix for you: Personally speaking, for plain test links I just use
href=""For links that point to a javascript function I tend to use
href="javascript:;". Either way you’ll stop the page jumping.