Get a free trial // Grow your CSS skills // Land your dream job

Keep IE6 from running a .js file?

  • # January 2, 2009 at 4:41 pm

    I don’t want IE6 to run a particular piece of javascript, just because it’s laggy and I don’t want to worry about it. If the javascript is disabled, IE6 users can see the content just fine.

    My question is, is there any way to tell IE6 to NOT load a particular javascript file? I basically need the opposite of a conditional statement.

    # January 2, 2009 at 4:50 pm

    You can still use a conditional statement, it just has to be "If not IE6, then".

    I believe it looks something like this:

    < ![if !(IE 6)]>

    < ![endif]>
    # January 2, 2009 at 5:25 pm

    But if it’s commented out, wouldn’t every other browser ignore it?

    EDIT: Nevermind, works like a charm. Thanks!

    # January 3, 2009 at 9:58 pm

    Yup, thats the "Everything BUT IE 6" runs this file

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed