Javascript IE8没有';附加对象
我对IE8没有附加我想要的元素有问题,请看下面的代码 咖啡Javascript IE8没有';附加对象,javascript,internet-explorer-8,coffeescript,Javascript,Internet Explorer 8,Coffeescript,我对IE8没有附加我想要的元素有问题,请看下面的代码 咖啡 testSite.create_featured_related_product = (modifier) -> __link = $('<a href="#">') __img = $('<img src="http://localhost:9000/img/img.png"/>') __link.append(__img) $( '.product-relation__group-' +
testSite.create_featured_related_product = (modifier) ->
__link = $('<a href="#">')
__img = $('<img src="http://localhost:9000/img/img.png"/>')
__link.append(__img)
$( '.product-relation__group-' + modifier ).prepend (__link)
@
这行代码似乎是jQuery的一部分
"inprogress" === e && (e = c.shift(), d--), f.cur = e, e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire()
上下文中的错误:
}), ib.extend({
queue: function (a, c, d) {
var e;
return a ? (c = (c || "fx") + "queue", e = ib._data(a, c), d && (!e || ib.isArray(d) ? e = ib._data(a, c, ib.makeArray(d)) : e.push(d)), e || []) : b
},
dequeue: function (a, b) {
b = b || "fx";
var c = ib.queue(a, b),
d = c.length,
e = c.shift(),
f = ib._queueHooks(a, b),
g = function () {
ib.dequeue(a, b)
};
"inprogress" === e && (e = c.shift(), d--), f.cur = e, e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire()
},
_queueHooks: function (a, b) {
var c = b + "queueHooks";
return ib._data(a, c) || ib._data(a, c, {
empty: ib.Callbacks("once memory").add(function () {
ib._removeData(a, b + "queue"), ib._removeData(a, c)
})
})
}
有什么想法吗?
编辑:简化了代码问题在于IE8对追加的处理。不是jQuery错误。您能从调用堆栈中看出是哪一行代码导致了错误吗?@HMR当然!我已经用调用堆栈编辑了我的问题。
"inprogress" === e && (e = c.shift(), d--), f.cur = e, e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire()
}), ib.extend({
queue: function (a, c, d) {
var e;
return a ? (c = (c || "fx") + "queue", e = ib._data(a, c), d && (!e || ib.isArray(d) ? e = ib._data(a, c, ib.makeArray(d)) : e.push(d)), e || []) : b
},
dequeue: function (a, b) {
b = b || "fx";
var c = ib.queue(a, b),
d = c.length,
e = c.shift(),
f = ib._queueHooks(a, b),
g = function () {
ib.dequeue(a, b)
};
"inprogress" === e && (e = c.shift(), d--), f.cur = e, e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire()
},
_queueHooks: function (a, b) {
var c = b + "queueHooks";
return ib._data(a, c) || ib._data(a, c, {
empty: ib.Callbacks("once memory").add(function () {
ib._removeData(a, b + "queue"), ib._removeData(a, c)
})
})
}