Wyłączenie skryptu na IE

Wyłączenie skryptu na IE
varmanpl
  • Rejestracja: dni
  • Ostatnio: dni
  • Lokalizacja: Kraków
  • Postów: 60
0

Już nie mogę wytrzymać z tym IE , muszę wyłączyć skrypt bo nie działa prawidłowo na IE, już wykorzystałem te opcje (.... to jakiś skrypt ):

Kopiuj
 <!--[if !IE]>
....
<![endif]-->
Skrypt wyłączany na każdej przeglądarce.

<!--[if !IE]><!-->
....
<!-- <![endif]-->
Skrypt nie zostaje wyłączony na IE

<![if !IE]>
....
<![endif]>
Skrypt nie zostaje wyłączony na IE
DE
  • Rejestracja: dni
  • Ostatnio: dni
  • Postów: 1788
0

Dla najnowszych IE:

Kopiuj
if (/MSIE 10/i.test(navigator.userAgent)) {
   // this is internet explorer 10
   window.alert('isIE10');
}

if(/MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent)){
    // this is internet explorer 9 and 11
    window.location = 'pages/core/ie.htm';
}

if (/Edge\/12./i.test(navigator.userAgent)){
   // this is Microsoft Edge
   window.alert('Microsoft Edge');
}
Kopiuj
function msieversion() {
            var ua = window.navigator.userAgent;
            var msie = ua.indexOf("MSIE ");

            if (msie > 0)      // If Internet Explorer, return version number
                alert(parseInt(ua.substring(msie + 5, ua.indexOf(".", msie))));
            else                 // If another browser, return 0
                alert('otherbrowser');

            return false;
        }
Kopiuj
<!--[if IE]>
According to the conditional comment this is IE<br />
<![endif]-->

<!--[if IE 6]>
According to the conditional comment this is IE 6<br />
<![endif]-->

<!--[if IE 7]>
According to the conditional comment this is IE 7<br />
<![endif]-->

<!--[if IE 8]>
According to the conditional comment this is IE 8<br />
<![endif]-->

<!--[if IE 9]>
According to the conditional comment this is IE 9<br />
<![endif]-->

<!--[if gte IE 8]>
According to the conditional comment this is IE 8 or higher<br />
<![endif]-->

<!--[if lt IE 9]>
According to the conditional comment this is IE lower than 9<br />
<![endif]-->

<!--[if lte IE 7]>
According to the conditional comment this is IE lower or equal to 7<br />
<![endif]-->

<!--[if gt IE 6]>
According to the conditional comment this is IE greater than 6<br />
<![endif]-->

<!--[if !IE]> -->
According to the conditional comment this is not IE 5-9<br />
<!-- <![endif]-->

http://www.quirksmode.org/css/condcom.html

mr_jaro
  • Rejestracja: dni
  • Ostatnio: dni
  • Lokalizacja: Grudziądz/Bydgoszcz
  • Postów: 5300
0

Nie podałeś o jakie ie chodzi. Bo najnowszego nie da się już wykryć tak jak poprzednich.

varmanpl
  • Rejestracja: dni
  • Ostatnio: dni
  • Lokalizacja: Kraków
  • Postów: 60
0

Chodziło o każde IE. Użyłem w końcu skryptu php który sprawdza przeglądarkę z requesta i wyłącza skrypt dla IE , te dyrektywy niestety nie działy za dobrze.

Maciej Cąderek
  • Rejestracja: dni
  • Ostatnio: dni
  • Lokalizacja: Warszawa
  • Postów: 1264
0

A navigator.userAgent nie zadziała?

mr_jaro
  • Rejestracja: dni
  • Ostatnio: dni
  • Lokalizacja: Grudziądz/Bydgoszcz
  • Postów: 5300
0

ja tam nie miałem problemu z tablesorter od ie > 9 :)

Zarejestruj się i dołącz do największej społeczności programistów w Polsce.

Otrzymaj wsparcie, dziel się wiedzą i rozwijaj swoje umiejętności z najlepszymi.