Question

I'm using jQuery for the first time and so I've added the jQuery 2.1 library to my ASP.NET project and referenced it from the Master Page like so:

<script type="text/javascript" src="Scripts/jquery-2.1.0.js"></script>

With all of the files on the web server, the pages work fine in Chrome - all of the jQuery stuff functions as expected. However, if I load the same pages in IE11 (I haven't had a chance to test other browsers yet), none of the jQuery functionality works.

Interestingly, if I launch IE11 from Visual Studio 2013's development environment, so that it runs the website in IIS express on my dev machine for testing purposes, everything works fine. So it's clearly not a browser compatibility issue, and it seems that I'm doing things right since it works in Chrome on the web server.

Any ideas what I could try? Are there any quirks for getting jQuery working in IE? I've tried referencing the jQuery script file from the individual Web Forms as well as the Master Page, but that didn't make any difference.

Was it helpful?

Solution

Have you checked the dev tools in IE (hit F12). Can you see JS errors on the console? Can you check dev tools and see if file is actually being requested on the live site and that you aren't getting a 404 for example. Dev tools -> network -> hit play button -> navigate to page and it shows you interactions

Can see a dev tools guide here http://msdn.microsoft.com/en-us/library/gg589507(v=vs.85).aspx

OTHER TIPS

Im having the same problem. Im using jquery-2.1.0.js in VS2013 and IE11. I found this solution posted by jakecigar http://forum.jquery.com/topic/issue-with-2-1-0-and-ie but did not work with IE11.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top