Internet-Explorer-10 – jQuery .map does not apply to IE 10

I have this jquery code:

$("#tf_zoom").live("click", function ( ) {
var n = $(".tf_thumbs").find("img").attr("src");
var modelid = n.substr(43);
$ .post("models/get_gallery", {
"modelid": modelid
}, function (data) {
var imagespathes = $(data).map(function (key, url) {
return ({
href:'assets/uploads/files/' + url
});
});
console.log(imagespathes);
$.fancybox.open(imagespathes);
}, "json");
});

This is me HTML:



Thumb1

Ok, now my problem is that this code does not run on IE 10, and surprisingly it is in IE 9, IE 8, IE 7 and FF and Google Chro The charm between me

I read a lot about this problem, but it didn’t work for me.
So, is there a solution.
Thank you very much for your help.

Update 1: I am using jquery version 1.7

maybe this tip Can help you:

I noticed that .map($(“select”).get(0).options) does not work in IE10 but .map($(“select: first > option”)) will work. This is because the select node with iterative options is returned in ie10 .options.

Then look at the data returned in IE10, maybe it is not an array either .If so, maybe you can do something like $(new Array(data)).map(…this will satisfy all browsers

I have this jquery code:

$("#tf_zoom").live("click", function () {
var n = $(".tf_thumbs"). find("img").attr("src");
var modelid = n.substr(43);
$.post("models/get_gallery", {
"modelid" : modelid
}, function (data) {
var imagespathes = $(data).map(function (key, url) {
return ({
href:'assets/uploads/files/' + url
});
});
console.log(imagespathes);
$.fancybox. open(imagespathes);
}, " json");
});

This is my HTML:



Thumb1

Ok, now My problem is that this code does not run on IE 10, and it is surprising that it works between IE 9, IE 8, IE 7 and the charm between FF and Google Chrome

I read a lot about It’s about this problem, but it’s useless to me.
So, is there a solution.
Thank you very much for your help.

Update 1: I am using jquery version 1.7

Maybe this tip can help you:

I noticed that.map($(“select”).get( 0).options) does not work in IE10 but .map($(“select:first> option”)) will work. This is because select nodes with iteration options are returned in IE10 .options.

Then look at what the data returned in IE10 is, maybe it is not an array. If so, maybe you can do something like $(new Array(data)).map(…this will satisfy all browsers

Leave a Comment

Your email address will not be published.