2013-07-23 14 views
6

最近MVC 4アプリケーションをVS2010からVS2012に移行しました。すべての作業が終わったら.Net 4.0から.Net 4.5に移行し、NuGetパッケージを最新の安定バージョンにアップグレードしました。Internet Explorer 8とjquery addEventListener

すべてうまく動作しているように見えましたが、他のすべてのブラウザは正常に見えますが、IE8(IE7)を使用してもアプリケーションが動作しないことが通知されました。

次のエラーが表示されます: -

SCRIPT438:オブジェクトプロパティまたはメソッド 'のaddEventListener' jqueryの - 2.0.3.jsをサポートしていない、ライン834文字4

生成されたHTML次のようになります -

<!DOCTYPE html> 
    <html lang="en"> 
    <head> 
    <meta charset="utf-8" /> 
    <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" /> 
    <meta name="viewport" content="width=device-width" /> 
    <link href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" rel="stylesheet"/> 
    <link href="/Content/site.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.core.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.resizable.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.selectable.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.accordion.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.autocomplete.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.button.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.dialog.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.slider.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.tabs.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.datepicker.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.progressbar.css" rel="stylesheet"/> 
    <link href="/Content/themes/base/jquery.ui.theme.css" rel="stylesheet"/> 
    <link href="/Content/menubar.css" rel="stylesheet"/> 
    <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2compact"></script> 
    <script src="/Scripts/jquery-2.0.3.js"></script> 
    <script src="/Scripts/jquery-ui-1.10.3.js"></script> 
    <script src="/Scripts/jquery.validate.js"></script> 
    <script src="/Scripts/jquery.validate.unobtrusive.js"></script> 
    <script src="/Scripts/modernizr-2.6.2.js"></script> 
    </head> 

私の検索では、この方法は、IE8でサポートされていないことを明らかにしたが、私は問題のあるコードの私としてここから行くことがどこかわかりませんsをjqueryファイルに追加します。

答えて

17

IE8をサポートしていないjQuery 2.0を使用しています。

IE8をサポートしたい場合は、jQuery 1.xを使用する必要があります。

+0

ありがとうございました!早かった。 – tr3v

+0

1.xにダウングレードする方法はありますか? – BlueChippy

+2

@BlueChippy:NuGetコンソールから特定のバージョンをインストールします。 – SLaks

関連する問題