[英]infinite scroll not working
我正在為頁面使用無限滾動插件,但是在編寫代碼后似乎無法正常工作。我滾動到頁面底部,但無限滾動不會被觸發。 我已經包含了所有必需的文件,但仍然沒有用。 我已經包含了xhtml頁面。 我已經瀏覽了stackoverflow網站,但是找不到與我的問題類似的東西。
1)xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
<link href="Css/StyleSheet.css" rel="stylesheet" type="text/css"
media="screen" />
<script src="jquery.infinitescroll.js"></script>
<script>
$('#box').infinitescroll({
navSelector : '#page-nav',
// selector for the paged navigation (it will be hidden)
nextSelector : '#page-nav a',
// selector for the NEXT link (to page 2)
itemSelector : '.box'
// selector for all items you'll retrieve
behaviour: 'twitter'
});
</script>
</h:head>
<h:body class="thrColElsHdr">
<div class="box">
// Content
</div>
<div id="page-nav">
<a href="getMoreStatusList.xhtml"></a>
</div>
<!-- end #mainContent -->
</div>
</div>
</h:body>
您在以下時間錯過了逗號:
itemSelector:“。box”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.