www.webdeveloper.com
Results 1 to 3 of 3

Thread: basic jquery/js in IE7 not working?

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    64

    js in IE7 not working?

    The code below works everywhere but in IE7 (and likely IE6 I suppose). Is there a way to make this code work in IE7? See below:

    the js:
    Code:
    document.getElementById('projectDesc').setAttribute('class', 'hideDesc');
    I thought there was another way with javascript to assign a class, but this was all I could find in my searching.
    Last edited by BluegillMedia; 02-29-2012 at 03:06 PM.
    Hey, I like potatoes!
    Support the wwf org!

  2. #2
    Join Date
    Feb 2010
    Location
    Amsterdam
    Posts
    174
    you can use
    Code:
    document.getElementById('projectDesc').className = 'hideDesc';

  3. #3
    Join Date
    Nov 2006
    Posts
    64
    Thanks, I knew there was another similar format.
    Hey, I like potatoes!
    Support the wwf org!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles