0
나는 IE8 내가 원하는 요소를 추가하지에 문제가있어,IE8 객체 추가하지 않습니다 것은
testSite.create_featured_related_product = function(modifier) {
var __img, __link;
__link = $('<a href="#">');
__img = $('<img src="http://localhost:9000/img/img.png"/>');
__link.append(__img);
$('.product-relation__group-' + modifier).prepend(__link);
return this;
};
자바 스크립트를
커피
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)
@
아래의 코드를 참조하십시오
위의 내용 중 아무 것도 (ti)에 추가되지 않습니다 (<a>
및 <img>
). 그는 <div class="group">
입니다. 나는 IE8 콘솔에서 얻을 오류 :
'undefined' is null or not an object jquery-with-plugs__0.3.1.js, line 963 character 13
그 라인은 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)
})
})
}
어떤 아이디어? 편집 : 코드 단순화
호출 스택에서 코드의 어떤 줄에서 오류가 발생합니까? – HMR
@HMR 예! 호출 스택으로 내 질문을 편집했습니다. –