Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    567
    Thanks
    2
    Thanked 4 Times in 4 Posts

    changing the cursor?

    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?
    Scott Stewart
    Always happy to learn from pros.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no. only IE recognises "hand"... use "pointer" instead.
    redhead

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    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.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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;
    }

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Posts
    567
    Thanks
    2
    Thanked 4 Times in 4 Posts
    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.
    Scott Stewart
    Always happy to learn from pros.

  • #6
    Regular Coder
    Join Date
    Nov 2002
    Posts
    567
    Thanks
    2
    Thanked 4 Times in 4 Posts
    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???

    My cursor change works fine!

    Thanks for your help.


    Scott
    Scott Stewart
    Always happy to learn from pros.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •