Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using jquery-2.0.3 in ie8 browser : object doesn't support this property or method

I used jquery. It work fine in firefox. But when I open it by ie8 get same error : object dosn't suport this property or method . line 834 I disable this line and find same errors in this lines: 836,3316,...

I make sample code and test ,It not show my alerts never:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">
<script type="text/javascript" src="jscripts/jquery-2.0.3.js"></script>
<script type="text/javascript" >

    var isIE8 = $.browser.msie && +$.browser.version === 8;
var isIE8 = $.browser.msie && +$.browser.version === 8;
if ( isIE8 ) {
alert("ie8");}


alert("test");
...

Can everyone help me? Thank you!

like image 905
ali shekari Avatar asked Aug 05 '13 17:08

ali shekari


1 Answers

As noted in the comments, jQuery 2.x " does not support Internet Explorer 6, 7, or 8"

From http://api.jquery.com/jQuery.browser/:

This property was removed in jQuery 1.9 and is available only through the jQuery.migrate plugin. Please try to use feature detection instead.

like image 63
Zach Lysobey Avatar answered Oct 16 '22 01:10

Zach Lysobey