|
@@ -9,17 +9,21 @@
|
|
|
*
|
|
*
|
|
|
* 사용 예)
|
|
* 사용 예)
|
|
|
* // HTML 태그는 다음과 같은 구조로 되어 있어야 하며
|
|
* // HTML 태그는 다음과 같은 구조로 되어 있어야 하며
|
|
|
- * // id 명칭은 infiniteContainer, listBoxOuter, listBox 가 필요하다.
|
|
|
|
|
- * <section id="infiniteContainer">
|
|
|
|
|
- * <div id="listBoxOuter">
|
|
|
|
|
- * <ul id="listBox">
|
|
|
|
|
- * </ul>
|
|
|
|
|
|
|
+ * // data-id는 layer_infinite,layer_infinite_item 가 필요하고 id 명칭은 infiniteContainer, listBoxOuter, listBox 가 필요하다.
|
|
|
|
|
+ * <div id="layer_goods_qna" data-id="" > 레어팝업
|
|
|
|
|
+ * <div class="modal-body" id="goodsDealQna" data-id="layer_infinite_item" >
|
|
|
|
|
+ * <section id="infiniteContainer">
|
|
|
|
|
+ * <div id="listBoxOuter">
|
|
|
|
|
+ * <ul id="listBox">
|
|
|
|
|
+ * </ul>
|
|
|
|
|
+ * </div>
|
|
|
|
|
+ * </section>
|
|
|
* </div>
|
|
* </div>
|
|
|
- * </section>
|
|
|
|
|
|
|
+ * </div>
|
|
|
*
|
|
*
|
|
|
* // JQUERY History 파일과 인피니트 스크롤 관련 자바스크립트 파일을 import 되어 있어야 한다.
|
|
* // JQUERY History 파일과 인피니트 스크롤 관련 자바스크립트 파일을 import 되어 있어야 한다.
|
|
|
* <script type="text/javascript" src="/ux/plugins/jquery.history.min.js"></script>
|
|
* <script type="text/javascript" src="/ux/plugins/jquery.history.min.js"></script>
|
|
|
- * <script type="text/javascript" src="/ux/plugins/gaga.infinite.scroll.js"></script>
|
|
|
|
|
|
|
+ * <script type="text/javascript" src="/ux/plugins/gaga.infinite.scrollLyer.js"></script>
|
|
|
*
|
|
*
|
|
|
* <script type="text/javascript">
|
|
* <script type="text/javascript">
|
|
|
* // 인피니트 스크롤에 대한 History 정보를 가져오기 위해 함수를 호출한다.
|
|
* // 인피니트 스크롤에 대한 History 정보를 가져오기 위해 함수를 호출한다.
|
|
@@ -59,8 +63,7 @@ var gagaInfiniteScroll = {
|
|
|
},
|
|
},
|
|
|
scrollCheck : function() {
|
|
scrollCheck : function() {
|
|
|
var obj = this.obj, stat = this.pageStatus;
|
|
var obj = this.obj, stat = this.pageStatus;
|
|
|
-
|
|
|
|
|
- if (obj.$window.scrollTop() >= obj.$ajaxBox.offset().top + obj.$ajaxBox.height() - obj.$window.height()) { // 더보기
|
|
|
|
|
|
|
+ if ($('[data-id="layer_infinite"]').scrollTop() + $('[data-id="layer_infinite"]').height() >= $('[data-id="layer_infinite_item"]').height() ) { // 더보기
|
|
|
if (stat.loadAlign == 'not') {
|
|
if (stat.loadAlign == 'not') {
|
|
|
var pageLen = this.pageStatus.pageNum.length - 1;
|
|
var pageLen = this.pageStatus.pageNum.length - 1;
|
|
|
var nextPageNum = this.pageStatus.pageNum[pageLen] + 1;
|
|
var nextPageNum = this.pageStatus.pageNum[pageLen] + 1;
|
|
@@ -68,6 +71,7 @@ var gagaInfiniteScroll = {
|
|
|
this.pageStatus.loadPage = nextPageNum;
|
|
this.pageStatus.loadPage = nextPageNum;
|
|
|
stat.loadAlign = 'next';
|
|
stat.loadAlign = 'next';
|
|
|
this.getDataList();
|
|
this.getDataList();
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -103,7 +107,11 @@ var gagaInfiniteScroll = {
|
|
|
gagaInfiniteScroll.draw(historyData.data.htm);
|
|
gagaInfiniteScroll.draw(historyData.data.htm);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- $(window).on('scroll', function() {
|
|
|
|
|
|
|
+// $(window).on('scroll', function() {
|
|
|
|
|
+// gagaInfiniteScroll.scrollCheck();
|
|
|
|
|
+// });
|
|
|
|
|
+
|
|
|
|
|
+ $('[data-id="layer_infinite"]').on('scroll', function() {
|
|
|
gagaInfiniteScroll.scrollCheck();
|
|
gagaInfiniteScroll.scrollCheck();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|