I have this JS code.
I want to show a "hand" cursor when I hover on the div like it would normally do for an a href.
$("#button1div").click(function(){
window.location = 'http://google.com';
});
How do I make the cursor change to a hand?
Thanks.
While you seem to want to do this with Javascript, there is a much easier way to do it with CSS alone:
#button1div {
cursor: pointer;
}
And, I'm not sure if you're really doing anything more than changing window.location when that div is clicked, but it looks like you could use an a element with no problem.
#button1div { cursor: pointer; }add this in your css. I think this'll help you.