374 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 3-4 years
  • United Kingdom
  • Referred between 100 and 199 users
  • Bought between 1 and 9 items
  • Exclusive Author
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
  • Has been a member for 5-6 years
  • Germany
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Microlancer Beta Tester
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
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]-->
374 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 3-4 years
  • United Kingdom
  • Referred between 100 and 199 users
  • Bought between 1 and 9 items
  • Exclusive Author
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.

1571 posts Building the Web.
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Has been a member for 4-5 years
+2 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
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
+2 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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Serbia
wpCanyonThemes says

Why not use jQuery :P

$.browser

238 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
ewizz says

Why use IE?

1021 posts
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 4-5 years
  • Bought between 10 and 49 items
  • Exclusive Author
  • Microlancer Beta Tester
  • United States
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

374 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 3-4 years
  • United Kingdom
  • Referred between 100 and 199 users
  • Bought between 1 and 9 items
  • Exclusive Author
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