How to Specify CSS for a JavaScript Piece?

Discussion in 'Javascript' started by bdwise, Nov 5, 2003.

  1. bdwise

    bdwise Guest

    I have a piece of mouseover javascript that is this
    .... "this.style.cssText='cursor:hand' ...

    But I want to specify a class in my stylesheeet instead. How do I do that?
    bdwise, Nov 5, 2003
    #1
    1. Advertising

  2. (bdwise) writes:

    > I have a piece of mouseover javascript that is this
    > ... "this.style.cssText='cursor:hand' ...
    >
    > But I want to specify a class in my stylesheeet instead. How do I do that?


    Like this
    this.className='nameOfClass';
    ?

    /L
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, Nov 5, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samuel Lee
    Replies:
    1
    Views:
    631
    Benjie Fallar
    Jul 25, 2003
  2. Patrick Plattes

    Download a file piece by piece

    Patrick Plattes, Nov 30, 2006, in forum: Ruby
    Replies:
    2
    Views:
    192
    Patrick Plattes
    Nov 30, 2006
  3. Richard A. DeVenezia

    Can I use CSS to specify event handlers ?

    Richard A. DeVenezia, Sep 1, 2003, in forum: Javascript
    Replies:
    3
    Views:
    286
    David Dorward
    Sep 1, 2003
  4. Eqbal
    Replies:
    8
    Views:
    96
    Michael Winter
    Oct 7, 2004
  5. sasperilla
    Replies:
    2
    Views:
    103
    sasperilla
    Feb 22, 2006
Loading...

Share This Page