1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

can I hide a script from IE6?

Discussion in 'JavaScript' started by johnnyblotter, Apr 25, 2010.

  1. #1
    Thanks to Koko5 for helping me out with my jquery for my drop down menu. Unfortunately, I now have a dropdown which works fine on everything except IE6. I need to figure out if I have to recode the drop-down, or try to hide the script from IE6. The problem is, the nav items in the dropdown in IE6 blink whenever they are hovered over. They are blinking because the jquery script is causing the background-image to change in a nearby div. I am using the son of suckerfish style for the dropdown menu. Either I need to try to disable the script for IE6 or re-do the nav...take a look at what I'm talking about, and if any of you have IE6 you'll see what I mean...

    http://www.jontakiff.com/lifebook
     
    johnnyblotter, Apr 25, 2010 IP
  2. Amator

    Amator Well-Known Member

    Messages:
    1,424
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #2
    Amator, Apr 25, 2010 IP
  3. rezanew

    rezanew Member

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    you can test if the user is using IE6 or not by this code:

    isIE6 = /msie|MSIE 6/.test(navigator.userAgent);
    	if (!(isIE6)) {
    // The code you want to hide from IE6
    	
    	}
    Code (markup):
     
    rezanew, Apr 25, 2010 IP
  4. Logic Ali

    Logic Ali Well-Known Member

    Messages:
    170
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Never read the userAgent sting.

    if( typeof XMLHttpRequest === 'undefined' )
    {
     // it's IE6 or lower
     // (or something else that won't support your code
    }
    Code (markup):
     
    Logic Ali, Apr 26, 2010 IP