...

View Full Version : changing the cursor?



ScottInTexas
11-28-2002, 06:03 PM
I would like to change the cursor to a hand on the mouseover event.

<TD onmouseover="ChangeCursor(this)" > some stuff</td>

function ChangeCursor(thisObject){

thisObject.style.cursor="hand";

}

Is this NS capable also?

redhead
11-28-2002, 06:07 PM
no. only IE recognises "hand"... use "pointer" instead.

jkd
11-28-2002, 06:44 PM
As redhead said, "hand" is a proprietary cursor value MS threw in. "pointer" means the same thing, and is the correct one to use, so use that one instead. :)

MCookie
11-28-2002, 11:06 PM
Win/IE5 doesn't know what to do with cursor:pointer; it needs cursor:hand;
and Win/IE6 doesn't understand cursor:hand; and needs cursor:pointer;

td {
cursor:pointer;
cursor:hand;
}

ScottInTexas
11-29-2002, 05:13 PM
I added the "cursor:pointer" to my MenuItem style in my style sheet but I still only get the I beam. The style sheet is being applied because other items are ahowing up.

What is the proper syntax for putting it in the tag itself?

<TD cursor="pointer">Something</TD> doesn't do anything and neither does

<TD cursor:pointer; class="MenuItem">Something</TD>

my tag is currently like this

<TD class="MenuItem" >Something </TD>

my style def is this;

.MenuItem{
height:20px;
margin-top:0px;
margin-left:0px;
padding-top: 0;
font-size:6;
background-Color: #501efe;
cursor:pointer;
cursor:hand;
}
Thanks for the help.

ScottInTexas
11-29-2002, 05:53 PM
NEVER MIND!!!! I was having a moment of stupidity. It turns out I had definitions in two places and the one being edited was not the one being used. DUH??? :o

My cursor change works fine!

Thanks for your help.


Scott



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum