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 ?
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]-->
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.
- Microlancer Beta Tester
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Sold between 100 000 and 250 000 dollars
EugeneO said
I manage to fix the problem anyway.
would be nice to also tell how, maybe others would have the same question
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 1 and 9 items
- Europe
- Exclusive Author
- Has been a member for 2-3 years
- Item was Featured
- Referred between 100 and 199 users
$browser = get_browser();
if($browser->browser == 'IE' && $browser->majorver == 6) {
echo "IE6";
} elseif($browser->browser == 'IE' && $browser->majorver == 7) {
echo "IE7";
}
Why not use jQuery 
Why use IE?
EugeneO said
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
ZoomIt saidI 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.
would be nice to also tell how, maybe others would have the same question
