내 웹 사이트에 Wookmark jQuery 격자 레이아웃을 사용하고 있습니다.jquery Wookmark Plugin 무한로드/Scoll
https://github.com/GBKS/Wookmark-jQuery
나는 작업을 자동로드/무한 스크롤이 필요합니다.
예를 들어, 처음 10 개의 이미지를 다시로드하기 만하면 Wookmark.com 및 Pinterest.com에서 나머지 목록을 계속로드하는 방법은 무엇입니까?
변경을 시도하고 필자의 코드 부분 : 사전에
/**
* When scrolled all the way to the bottom, add more tiles.
*/
function onScroll(event) {
// Check if we're within 100 pixels of the bottom edge of the broser window.
var closeToBottom = ($(window).scrollTop() + $(window).height() > $(document).height() - 100);
if(closeToBottom) {
// Get the first then items from the grid, clone them, and add them to the bottom of the grid.
var items = $('#tiles li');
var firstTen = items.slice(0, 10);
$('#tiles').append(firstTen.clone());
// Clear our previous layout handler.
if(handler) handler.wookmarkClear();
// Create a new layout handler.
handler = $('#tiles li');
handler.wookmark(options);
}
};
감사합니다. Ive는 도처에 보았고, 약간의 다른 물건을 시험해 보았다. 그러나 어떤 운도. 건배.
감사합니다. 너의 전설! 정확히 내가 뭘하는지. 이제 JSONP 용 API를 만드는 방법을 모색 중입니다. JSONP 초보자를위한 좋은 사이트가 있습니까? – Anthony1234
JSON을 해결하고 POST를 사용하여 이미지 및 컨트롤 등을 가져 오도록 변경했습니다. Internet Explorer 8에서 작동하지 않는다고 생각하는 경우 GBKS를 궁금해하십니까? 이 문제가 있었나요? 첫 번째 부분을로드하지만 스크롤에서는 아무 것도 작동하지 않습니다. 너는 어떤 종류의 문제를 안다? 고마워. – Anthony1234