Using jQuery 1.10.1, for some reason this isn't working in IE10 but works fine everywhere else (read Chrome, Firefox). Discovered this bug while creating a fiddle for an answer on Stack Overflow.
HTML
<input type="text" id="anId" />
jQuery
$(function(){
$("#anId").keyup(function(){
alert(1);
});
});
Neither does this:
$(function(){
$("#anId").keydown(function(){
alert(1);
});
});
FIDDLE
FIDDLE
This is a bug in JQuery 1.10.1. You should be seeing a security error in your console on IE. This is fixed in JQuery 1.10.2.
See this jquery bug:
http://bugs.jquery.com/ticket/13980
From the bug:
In IFrame where the content is loaded from the external domain, JQuery v1.10.1 fails to load in Opera 12.15 and IE 10 with error "Unhandled error: Security error: attempted to read protected variable" on the line 1513.
Related
I've got a Wordpress running on cphdans.dk and are using the plugin Code Embed which let you add JavaScript directly to a post.
The JavaScript I'm embedding is:
<script>
$(function() {
jQuery("#loadTilmelding").load("http://pbs.cphdans.dk/index_dansidk.php#body");
});
</script>
Things work fine in Safari, Chrome and Firefox - but when trying to view the page in Internet Explorer I get nothing loaded.
The developer tools in IE9 doesn't report any errors in this matter.
I've Googled around and found similar issues when the html wasn't validated with w3, but I've done that with the page I'm trying to load into the DOM:
http://pbs.cphdans.dk/index_dansidk.php
When trying to output the loaded content into the log in IE I just get:
LOG: undefined
How can I debug when IE doesn't report any errors, and does anyone know what the issue could be?
I have got the below error when loading in Safari 5.1.7 for windows.
The error is as below:
TypeError: 'undefined' is not a function (evaluating 'div.cloneNode( true ).click()')
When drill deeper down to jquery 1.11.0 source code, it was pointing to the code below in bold:
// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
support.noCloneEvent = true;
if ( div.attachEvent ) {
div.attachEvent( "onclick", function() {
support.noCloneEvent = false;
});
**div.cloneNode( true ).click();**
}
I am using ASP.NET MVC 5.2. It seems that the JQuery failed to be loaded in Safari.
Any idea on why? Thanks!
This is weird. This error only happened in Safari 5.1.7 for Windows.
For some reason, I need to put JQuery script before other scripts even though that other scripts do not use JQuery.
This is resolved by putting JQuery script on top before other scripts.
Thanks.
I have the same problem, but I resolved with simulate.
Sample:
// Triggering a native browser event using the simulate plugin
$( "a" ).simulate( "click" );
Simulate events to help unit test user interactions. I try putting JQuery script on top, but not work for me.
I am loading jQuery UI from google's cdn. It works in every browser that I have to support (IE8+) except IE9. I'm getting a strange error on page load in the jQuery UI code at this line (line 249 in the unminified version):
$.support.selectstart = "onselectstart" in document.createElement( "div" );
The error is:
SCRIPT438: Object doesn't support property or method 'createElement'
The code to include it is
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.js">
</script>
I've looked at the 'document' object in the debugger, and it appears to have createElement defined (as expected).
I finally discovered the problem. I have no idea why it's happening, but for some reason there is a scoping issue document in IE9 isn't the document you'd expect it to be.
The behavior can be seen here: http://jsfiddle.net/esn2v/8/
with(block = document.createElement('div')) {
with(detaildiv = document.createElement('div')) {
alert('test');
}
}
It works fine in any browser except IE9. If you open it in IE9 no alert happens, and you can look at the console to see an error regarding document.
It doesn't happen if you just include jquery and jquery UI like here: http://jsfiddle.net/uRFz5/
<script src=
"//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
My app must just be a perfect storm that causes this issue to happen.
As mentioned I'm using latest version of jQuery.
I simply call
$('table').on('click', 'tr', function() {
alert('click');
});
It runs well on every browser except IE8 (not tested on IE7).
Note I'm running Windows on Parallels Desktop on my iMac.
The crash has something to do with mshtml.dll as reported by IE8 Crash dialog box.
Any advice?
Check the jsFiddle here: http://jsfiddle.net/powtac/kuht6/4/
is working fine here something else could be wrong
http://jsfiddle.net/5Hhmg/
I have a problem using $.getScript() on chrome. It doesn't work on chrome browser. I've tested it on firefox, ie and safari and it worked. All I have on my external script is an alert() and it doesn't work.
Here's the code:
page
$(document).ready(function(){
$("#btnGet").click(function(){
$.getScript("script.js");
});
});
script.js
alert('Get script loading');
Is anyone have experienced this problem?
Thanks guys for making it clear to me.
I think I would have my script inline instead since the inline code will work fine on all browsers.