JQuery IE绑定了这个

JRE*_*EAM 5 jquery internet-explorer

在IE中我使用JQuery在控制台中收到此错误:

SCRIPT438:Object不支持属性或方法'bind'default.js,第33行字符3

$.get(URL + 'dashboard/photoList/'+categoryID, (function(o) {
        // code here
}).bind(this));
Run Code Online (Sandbox Code Playgroud)

是否有解决'this'的工作?我从原型中习惯了这个.

Fel*_*ing 10

bind 仅在支持ECMAScript 5的浏览器中可用.与(显然)Prototype.js不同,jQuery不扩展内置对象.

jQuery提供$.proxy [docs]:

$.get(URL + 'dashboard/photoList/'+categoryID, $.proxy(function(o) {
        // code here
},this));
Run Code Online (Sandbox Code Playgroud)