Reputation: 8840
I am trying to open a link in a new window using jquery, and it appears to be working fine in Chrome and other browsers, but it will not work in IE. Any hints as to what is going wrong?
here my my script thing-a-ma-jig:
jQuery(document).ready(function(jQuery) {
jQuery('.popup').click(function() {
var NWin = window.open(jQuery(this).prop('href'), '', 'scrollbars=1,height=400,width=400');
if (window.focus)
{
NWin.focus();
}
return false;
});
});
and here is a link to a fiddle that ive setup:
thanks in advance!!!
Upvotes: 0
Views: 319
Reputation: 15246
After running your jsFiddle, I found that you were running with jQuery 1.10.1. When I switched it to run on a later version of jQuery (for example 2.1.0), my Internet Explorer 11 worked perfectly. It may be that jQuery 1.10.1 and IE 11 are not compatible with each other. Unless there is a compelling reason, always use the latest stable jQuery.
Upvotes: 1