Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show the little hand in a link that doesn't have the href attribute?

Tags:

i have this link <a>jander</a>.

When I put the mouse cursor over it, the selection cursor is shown instead of the little hand.

Is there any way to show the little hand?

Note: I don't want to use href='#' because it is that case when I click on the link (it's a link that executes ajax function), it goes to the top of the page.

like image 502
ziiweb Avatar asked Jan 13 '11 09:01

ziiweb


People also ask

Can I have a tag without href?

Yes, it is valid to use the anchor tag without a href attribute. If the a element has no href attribute, then the element represents a placeholder for where a link might otherwise have been placed, if it had been relevant, consisting of just the element's contents.

What happens if you do not give the href attribute in a tag?

Definition and Usage. The href attribute specifies the URL of the page the link goes to. If the href attribute is not present, the <a> tag will not be a hyperlink. Tip: You can use href="#top" or href="#" to link to the top of the current page!

What can I use instead of a href?

simply replacing <a href="myLink. html">mylink</a> with <a ontouchstart="window. location='myLink.

Is href attribute required?

Is href required on links? Yes. Anchors without href attributes are not links. If you are doing that, then do it right.


1 Answers

Style the cursor as so:

<a style="cursor:pointer;">jander</a> 
like image 197
Paddy Avatar answered Oct 21 '22 23:10

Paddy