Answer the question
In order to leave comments, you need to log in
Why don't conditional comments work?
On the page www.complex-safety.com/contact after "how to get to our office on foot" there should be a Yandex map. But it does not work in ie8, I decided to replace it with a static one. I wrapped the script with the map in a comment, but for some reason the map is not shown in all browsers. Here is the complete code:
<!--[if !(IE 8)]>
<script type="text/javascript" charset="utf-8" src="//api-maps.yandex.ru/services/constructor/1.0/js/?sid=WcrZ7ic6V23Ummldw0a9mbCObyfKl3Bi&width=600&height=450"></script>
<![endif]-->
Answer the question
In order to leave comments, you need to log in
For IE8, you need to write like this:
<!--[if !IE 8]><!-->
<script type="text/javascript" charset="utf-8" src="//api-maps.yandex.ru/services/constructor/1.0/js/?sid=WcrZ7ic6V23Ummldw0a9mbCObyfKl3Bi&width=600&height=450"></script>
<!--<![endif]-->
Conditional comments were cut out of IE (starting from version 10 in my opinion). You need to rewrite it to be IE8 only, such as hiding the map block in it.
and so? - without brackets:
Is it possible to do this with js?
if (($.browser.msie) && ($.browser.version == '8.0'))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question