無限スクロールからコールバックする正しい方法は何ですか? 現在、この `
$(function() {
code();
$('#catview').infinitescroll({
dataType: 'html',
navSelector: 'div.nextPage',
nextSelector: 'div.nextPage a:first',
itemSelector: '#catalogue',
loading: {
finishedMsg: '',
msgText: '',
img: '/../../../images/loading.gif',
},
debug: true,
animate: true
}, $(function() {
code();
}));
});`
動作しません:( code() の前にアラートを設定すると、ページが読み込まれたときにアラートが表示され、それだけです...コードの他の部分は次のとおりです。
function code() {
alert('1')
$('.teest').caroufredsel({
direction: 'left',
circular: true,
items: {
visible: 1,
minimum: 2,
},
scroll: {
fx: 'fade',
easing: 'easeOutCubic',
duration: 200,
},
auto: {
duration: 1600
},
width: 208,
height: 265,
prev: {
button: '.prev'
},
next: {
button: '.next'
}
});
}
これらの 2 つのコードを実行した場合に表示されるのは、最初のページで動作している caroufredsel の alert 1 だけです。