Jquery 无限滚动不适用于弹出窗口
我的页面上有链接,其中显示了一个带有以下html的全屏弹出窗口:Jquery 无限滚动不适用于弹出窗口,jquery,ajax,infinite-scroll,Jquery,Ajax,Infinite Scroll,我的页面上有链接,其中显示了一个带有以下html的全屏弹出窗口: <div class="movie-popup-container"> <div class="popup"> <-- content of popup --!> </div> </div> 我已经将插件配置为只用于弹出式滚动,而不用于窗口滚动。它只适用于某些弹出窗口,但不适用于其他弹出窗口,并且没有模式。它适用于以前不适用的同一
<div class="movie-popup-container">
<div class="popup">
<-- content of popup --!>
</div>
</div>
我已经将插件配置为只用于弹出式滚动,而不用于窗口滚动。它只适用于某些弹出窗口,但不适用于其他弹出窗口,并且没有模式。它适用于以前不适用的同一弹出窗口,反之亦然。Contentwise所有弹出窗口都有相同的数据。调试日志如下所示:
$('#activity').infinitescroll({
behavior: 'local',
binder: $('.movie-popup-container'),
bufferPx: 100,
loading: {
finishedMsg: "This is the end!",
img: "/images/loading2.gif?ver=1",
msgText: "Loading ...",
speed: "slow",
selector: "#movie-activity-container #loading-status"
},
debug: true,
navSelector: navSelectorNew,
// selector for the paged navigation (it will be hidden)
nextSelector: nextSelectorNew,
// selector for the NEXT link (to page 2)
itemSelector: ".movie-activity-feed"
// selector for all items you'll retrieve
});
//1st popup
XHR finished loading: "http://example.com/GetMain.jsp?productId=6219a937-6d9c-4d42-81b6-85380c306732". jquery.min.js:2
XHR finished loading: "http://example.com/GetXYZ.jsp?cache=0&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=2". jquery.min.js:2
["determinePath", Array[2]]
plugins.js:51
["Binding", "bind"] plugins.js:51
["math:", 2813, 2728] plugins.js:51
["heading into ajax", "/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=2"] plugins.js:51
Using HTML via .load() method plugins.js:51
XHR finished loading: "http://example.com/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=2". jquery.min.js:2
["contentSelector", div#movie-activity]
plugins.js:51
["math:", 2613, 2728] plugins.js:51
["heading into ajax", "/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=3"] plugins.js:51
Using HTML via .load() method plugins.js:51
XHR finished loading: "http://example.com/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=3". jquery.min.js:2
["contentSelector", div#movie-activity]
plugins.js:51
["math:", 1973, 2728] plugins.js:51
["heading into ajax", "/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=4"] plugins.js:51
Using HTML via .load() method plugins.js:51
XHR finished loading: "http://example.com/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=4". jquery.min.js:2
["contentSelector", div#movie-activity]
plugins.js:51
["math:", 1173, 2728] plugins.js:51
["heading into ajax", "/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=5"] plugins.js:51
Using HTML via .load() method plugins.js:51
XHR finished loading: "http://example.com/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=5". jquery.min.js:2
["Error", "end"] plugins.js:51
["Binding", "unbind"] plugins.js:51
//1st popup closed with successful scrolling
//2nd popup
XHR finished loading: "http://example.com/GetMain.jsp?productId=6219a937-6d9c-4d42-81b6-85380c306732". jquery.min.js:2
XHR finished loading: "http://example.com/GetXYZ.jsp?cache=0&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=2". jquery.min.js:2
["determinePath", Array[2]]
plugins.js:51
["Binding", "bind"] plugins.js:51
["math:", 3113, 2728] plugins.js:51
["math:", 2813, 2728] plugins.js:51
["heading into ajax", "/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=2"] plugins.js:51
Using HTML via .load() method plugins.js:51
XHR finished loading: "http://example.com/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=2". jquery.min.js:2
["contentSelector", div#movie-activity]
plugins.js:51
["math:", 1984, 2728] plugins.js:51
["heading into ajax", "/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=3"] plugins.js:51
Using HTML via .load() method plugins.js:51
XHR finished loading: "http://example.com/GetXYZ.jsp?cache=1&type=all&productId=6219a937-6d9c-4d42-81b6-85380c306732&page=3". jquery.min.js:2
["contentSelector", div#movie-activity]
plugins.js:51
//2nd popup closed with successful scrolling
//3rd popup
XHR finished loading: "http://example.com/GetMain.jsp?productId=cf352423-0b05-4fa2-9ca8-323842bc96c2". jquery.min.js:2
XHR finished loading: "http://example.com/GetXYZ.jsp?cache=0&type=all&productId=cf352423-0b05-4fa2-9ca8-323842bc96c2&page=2". jquery.min.js:2
["determinePath", Array[2]]
plugins.js:51
["Binding", "bind"] plugins.js:51
["math:", 3113, 2308] plugins.js:51
["math:", 2913, 2308] plugins.js:51
["math:", 2613, 2308] plugins.js:51
["math:", 2464, 2308]
//3rd popup scrolling failed despite going till bottom.
对于上面日志中的第三个弹出窗口,我一直滚动到底部,它只是在调试中不断显示数学行。
另外,你能告诉我这一行[“数学:”,31132308]代表什么吗?数学代表:
this._debug('math:', pixelsFromWindowBottomToBottom, opts.pixelsFromNavToBottom);
// if distance remaining in the scroll (including buffer) is less than the orignal nav to bottom....
return (pixelsFromWindowBottomToBottom - opts.bufferPx < opts.pixelsFromNavToBottom);
this.\u debug('math:',pixelsFromWindowBottomToBottom,opts.pixelsFromNavToBottom);
//如果滚动中的剩余距离(包括缓冲区)小于原始导航到底部的距离。。。。
返回(pixelsFromWindowBottomToBottom-opts.bufferPx
看
2464-40<2308=错误
它应该调用this.retrieve()
//我看到您将bufferPx设置为100,这仍然应该解析为false
2464-100<2308=错误
必须进一步研究…由于您没有提供可测试的示例,我将根据以下几个假设回答此问题:
$(elem).infinitescroll(options,[callback for reinitalization of popups]);