407 posts
  • Top Monthly Author
  • Weekly Top Seller
  • Elite Author
  • Author Level 9
+7 more
EugeneO
says

I have a jQuery animation that works fine in all browsers but does not work as intended in IE7 most probably because of some obscure CSS bug. Is there a way I can allow the script to be included in all browsers except IE7 ?

1799 posts
  • Affiliate Level 1
  • Author Level 4
  • Beta Tester
  • Collector Level 2
+4 more
BroOf
says

If you want to include the script in all browser but not in IE 7 you can use this code:

<!--[if ! IE 7]>
Script goes here
<![endif]-->
407 posts
  • Top Monthly Author
  • Weekly Top Seller
  • Elite Author
  • Author Level 9
+7 more
EugeneO
says

I thought IE conditional statements are only seen by Internet Explorer browsers so the example you gave would only include the script in all IE browsers except IE7 .

I manage to fix the problem anyway.

1744 posts Building the Web.
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Beta Tester
+10 more
ZoomIt
says

I manage to fix the problem anyway.

would be nice to also tell how, maybe others would have the same question

3007 posts
  • 5 Years of Membership
  • Affiliate Level 5
  • Author Level 9
  • Bundle Boss
+8 more
duotive
says
Why not use php?

$browser = get_browser();

if($browser->browser == 'IE' && $browser->majorver == 6) {
    echo "IE6";
} elseif($browser->browser == 'IE' && $browser->majorver == 7) {
    echo "IE7";
}


1383 posts
  • 5 Years of Membership
  • Affiliate Level 2
  • Collector Level 2
  • Exclusive Author
+1 more
wpCanyonThemes
says

Why not use jQuery :P

$.browser

238 posts
  • 5 Years of Membership
  • Collector Level 1
  • Exclusive Author
ewizz
says

Why use IE?

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

I thought IE conditional statements are only seen by Internet Explorer browsers so the example you gave would only include the script in all IE browsers except IE7 .

There are two types of conditional comments: downlevel hidden, and downlevel revealed.

Here is the first type:

<!--[if IE]> HTML <![endif]-->

This is hidden for most browsers because it looks just like a comment, and revealed for IE, since the expression evaluates as true.

Here is the second type

<![if !IE]> HTML <![endif]>

This one is parsed by most browsers because it looks like HTML inside an arbitrary block element. Additionally, if the expression evaluates as true in IE (which this expression won’t), it would also be parsed. In this case, the HTML would be parsed by every browser except IE

407 posts
  • Top Monthly Author
  • Weekly Top Seller
  • Elite Author
  • Author Level 9
+7 more
EugeneO
says

would be nice to also tell how, maybe others would have the same question
I managed to fix the actual problem which was caused by a conflict in z-index values. It was another case of a website rendering flawlessly in every single browser except IE7 . I’m at the stage where if something doesn’t work in IE7 and it isn’t a central piece of the design or function I would rather just rip it out. Luckily I figured this one out pretty soon after posting this thread.
by
by
by
by
by
by