SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot matches's Avatar
    Join Date
    Aug 2006
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    prototype sanity check

    Hello all.

    I just got handed a project that requires I learn prototype (I normaly work with mootools) I am trying to use the code below to add a class to a element. But for some reason it's not working.

    Code:
    if (currentURL.include("new_by_subject") || currentURL.include('proovs/sent')) {
          $("newBySubject").addClassName("active");      
      }
    Thanks for any help

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,688
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    There's nothing wrong with the code. A link to the page in question will be valuable in troubleshooting this.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

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