Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make mouse pointer become hand to click button

Tags:

jquery

asp.net

<td id="btnIcOld" style="text-align:center;">
    <img src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Load.png")%>" />
</td>

$('#btnIcOld').live('click', function () {
    window.location.href = 'https://extranetint.chathamfinancial.com/indications/swapcalculator';
});

So as you can see above, the image is my button, and that is the JQuery that handles the button click. Problem is, when you hover your mouse over the image, it stays as the basic arrow pointer. How do I make it change to a hand so the user knows they can click on it?

like image 429
slandau Avatar asked Jan 07 '11 16:01

slandau


Video Answer


2 Answers

You can edit your style for the column to be cursor:pointer see CSS cursor property.

<td id="btnIcOld" style="text-align:center;cursor:pointer;">
    <img src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Load.png")%>" />
</td>
like image 56
Quintin Robinson Avatar answered Oct 14 '22 05:10

Quintin Robinson


Change the cursor's style when above the image:

<td id="btnIcOld" style="text-align:center;">
    <img style="cursor: pointer" src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Load.png")%>" />
</td>
like image 33
SirDarius Avatar answered Oct 14 '22 05:10

SirDarius