jquery 플러그인을 사용하여 jquery 1.6을 사용할 때 슬라이더 격자를 표시합니다. jquery 2.4로 변경하면 잘 작동합니다.Uncaught Error : 구문 오류, 인식 할 수없는 표현식 : Function.Sizzle.error에서 .tj_row_2, .tj_row_3, Function.Sizzle.error
catch되지 않은 오류 : 구문 오류, 인식 할 수없는 표현 : 1이이 오류 보여 Function.Sizzle.error
검색 후에서 .tj_row_1, .tj_row_2, .tj_row_3을, 나는 코드의이 부분에 의해 발생하는 오류를 발견 :
pagination : function($wrapper, dir, opts) {
var config = $wrapper.data('config');
if((dir === 1 && config.currentRow + opts.rows > config.totalRows) ||
(dir === -1 && config.currentRow - 1 <= 0)
) {
$wrapper.data('anim', false);
return false;
}
var movingRows = '';
for(var i = 0; i <= opts.rows; ++i) {
(dir === 1)
? movingRows += ".tj_row_" + (config.currentRow + i) + ","
: movingRows += ".tj_row_" + (config.currentRow + (i - 1)) + ",";
}
var seq_t = opts.type.factor,
$elements;
var dircond = 1;
if(opts.type.reverse) dircond = -1;
if(dir === dircond) {
$elements = $wrapper.children(movingRows);
}else {
$elements = $wrapper.children(movingRows).reverse();
}
var total_elems = $elements.length,
cnt = 0;
$elements.each(function(i) {
var $el = $(this),
row = $el.attr("class"),
animParam = {},
currentRow = config.currentRow;
setTimeout(function() {
// if first row fade out
// if last row fade in
// for all the rows move them up/down
if(dir === 1) {
if( row === "tj_row_" + (currentRow)) {
animParam.opacity = 0;
}
else if(row === "tj_row_" + (currentRow + opts.rows)) {
animParam.opacity = 1;
}
}
else {
if( row === "tj_row_" + (currentRow - 1)) {
animParam.opacity = 1;
}
else if(row === "tj_row_" + (currentRow + opts.rows - 1)) {
animParam.opacity = 0;
}
}
$el.show();
(dir === 1)
? animParam.top = $el.position().top - $el.height() + 'px'
: animParam.top = $el.position().top + $el.height() + 'px'
$el.stop().animate(animParam, opts.type.speed, opts.type.easing, function() {
if(parseInt(animParam.top) < 0 || parseInt(animParam.top) > $el.height() * (opts.rows - 1))
$el.hide();
++cnt;
if(cnt === total_elems) {
$wrapper.data('anim', false);
}
});
}, seq_t + i * seq_t);
});
(dir === 1) ? config.currentRow += 1 : config.currentRow -= 1;
$wrapper.data('config', config);
}
오류가 바뀌었다 : opts.rows.map 함수 아니다 Object.pagination에서 (j_row_5
는가 나는 어레이의 다음의 값을 얻을 다음 배열에 문자열을 변환 jquery.gridnav.js : 345) (HTMLSpanElement) 012SpeedElement.dispatch에서 (jquery.gridnav.js : 710) HTMLSpanElement.elemData.handle (jquery-2.1.4.js : 4121)에서 –
아, 내 실수 . 'opts.rows'는 배열이라고 생각했습니다. 나는 당신을 위해 대답을 업데이트했다. –