Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jquery addclass , just a question.

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26332

    Hello all i’ve finally started to do some real jquery stuff instead of reading tutorial etc,

    so i noticed something.

    I write css like this

    ul.menu
    ul.menu li ul li

    In jquery there is this addClass(”) thing.
    Can i have something like addClass(‘ul.menu’) or it only accepts addClass(‘menu’)

    #64978
    blue642
    Member

    It would only accept "menu" because menu is the only class you mentioned.

    ul.menu means literally a "ul" element (unordered list) with a "menu" class attribute.
    aka:

    Code:

      so "ul.menu" is not a class name.

      what exactly are you trying to accomplish, I may be able to help.

      #64994

      Thanks i really need some help here.
      I’ve attached the css, jquery code, html code all in 1 file below.

      WIthout jquery it works in all browsers which support li:hover but i’m trying to make it work with ie6 also.

      Code:



      JQuery



      #65006
      blue642
      Member

      I don’t have IE6 to help test, but I don;t see why with that jQuery it wouldn’t work.

    Viewing 4 posts - 1 through 4 (of 4 total)
    • The forum ‘JavaScript’ is closed to new topics and replies.