JQuery - undefined exception in IE11

In IE11, I get this exception

'jQuery' - undefined

I do not get this error in any other browser. The code causing the problem is

jQuery(document).ready(function(){

Does anyone know why this is and what might cause the problem?

+5
source share
3 answers

In IE11, depending on security settings, access to external CDNs may be blocked.

Thus, you will need to add 2 jQuery URLs, one for (any other browser) and one locally.

// First try loading jQuery from Google CDN
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

// Fall back to a local copy of jQuery if the CDN fails
<script>
window.jQuery || document.write('<script src="/js/jquery.min.js"><\/script>')
</script>

Link: https://bugsnag.com/blog/jquery-is-not-defined-cause-solution

+6
source

Internet Explorer 11. - , Internet Explorer 7. .

jQuery 2.2 . , IE9 .

Internet Explorer Compatibility List

.

<meta http-equiv="X-UA-Compatible" content="IE=11" >
+2

, , 'jquery' . jquery .js, , jquery "".

0

All Articles