jquery-scroll-pagination's People
Forkers
fengyiyi sokardys b2ornot2b lecar-red juancarloscruzd kimu dansnowley89 brenooliveira geekboard richard132 jcfr lpirola hisapy dbsgen brocard patw0929 eller82 manageyp netvip zoftdev imyandy ustbtaotao diogoand1 kokorodo douglasevaristo sweetwxh aurelielb minimofish wangzhfeng pengyan518 jadulled tomvieira eziojia hammz lzw216 colorwalf zero7u andrew703 jciwolf stephanembl renamathai liuchuangww cristiand1 tomaszkulakowski szmufo jacobking udbmnm xunux thomaslau snowindy tingxiaogit bananaxzw divxpro abin-andrews aln97 impodream steven5538 truongchinhit patrique83 achatir djeraseit j-zang jimshute zhaoyan158567 meechn cailu5382805 deka4tech jeccy100 d8q8 manoj-singh-developer laogui2008 fordlee bijiajin pikachule wuchao288 caffriejquery-scroll-pagination's Issues
add delay
The fadeInWithDelay function doesn't seem to be working. How do I set the timing? Any suggestions?
IPhone 4/4S Safari
Don't work in Safari for iPhone 4/4S
sends multiple ajax request at a time
when scroll down too fast it sends multiple ajax request and shows duplicate data .
I have added error handling for jquery-scroll-pagination
/*
** Anderson Ferminiano
** [email protected] -- feel free to contact me for bugs or new implementations.
** jQuery ScrollPagination
** 28th/March/2011
** http://andersonferminiano.com/jqueryscrollpagination/
** You may use this script for free, but keep my credits.
** Thank you.
*/
(function( $ ){
$.fn.scrollPagination = function(options) {
var opts = $.extend($.fn.scrollPagination.defaults, options);
var target = opts.scrollTarget;
if (target == null){
target = obj;
}
opts.scrollTarget = target;
return this.each(function() {
$.fn.scrollPagination.init($(this), opts);
});
};
$.fn.stopScrollPagination = function(){
return this.each(function() {
$(this).attr('scrollPagination', 'disabled');
});
};
$.fn.scrollPagination.loadContent = function(obj, opts){
var target = opts.scrollTarget;
var mayLoadContent =
if (mayLoadContent){
if (opts.beforeLoad != null){
opts.beforeLoad();
}
$(obj).children().attr('rel', 'loaded');
$.ajax({
type: 'POST',
url: opts.contentPage,
data: opts.contentData,
success: function(data){
$(obj).append(data);
var objectsRendered = $(obj).children('[rel!=loaded]');
if (opts.afterLoad != null){
opts.afterLoad(objectsRendered);
}
},
error: function(jQuertXML, status, errorThrown) {
//NProgress.done();
opts.errorHandle(status);
},
dataType: 'html'
});
}
};
$.fn.scrollPagination.init = function(obj, opts){
var target = opts.scrollTarget;
$(obj).attr('scrollPagination', 'enabled');
$(target).scroll(function(event){
if ($(obj).attr('scrollPagination') == 'enabled'){
$.fn.scrollPagination.loadContent(obj, opts);
}
else {
event.stopPropagation();
}
});
$.fn.scrollPagination.loadContent(obj, opts);
};
$.fn.scrollPagination.defaults = {
'contentPage' : null,
'contentData' : {},
'beforeLoad': null,
'afterLoad': null ,
'scrollTarget': null,
'heightOffset': 0,
'errorHandle' : null
};
})( jQuery );
doesn't trigger in IE10
$.fn.scrollPagination.defaults changing on second call
As $.extend changes the value of the first argument, the correct command sould be:
var opts =
Using as it is (var opts =
scroll continues to load page automatically
I am having an issue where your scroll is continuing to load the page without interaction from the screen.
<script type="text/javascript"> $(function(){ var feeds = $("#feeds ul"); var last_time = feeds.children().last().data('id'); feeds.scrollFeedPagination({ 'contentPage': '/ajax_results.cfm?ajax_type=get_site_feed', 'contentData': { 'last_time' : last_time, 'f_member_id_recipient': '5', 'use_feed_type' : '1,2,3,4,5,6,7,9,12,13,14,15,16,17,18,19,20,21,22', 'use_class_id' : '1,2,3,4' }, 'heightOffset': 300, 'scrollTarget': $(window), 'beforeLoad': function(){ $('.loading').fadeIn(); }, 'afterLoad': function(elementsLoaded){ last_time = feeds.children().last().data('id'); feeds.scrollFeedPagination.defaults.contentData.last_time = last_time; $('.loading').fadeOut(); var i = 1; $(elementsLoaded).fadeIn(); } }); $.fn.fadeInWithDelay = function(){ var delay = 0; return this.each(function(){ $(this).delay(delay).animate({ opacity:1 }, 200); delay += 100; }); }; //calling the function to update news feed setTimeout('updateFeed()', 1000); }); /** * Function to update the news feed **/ function updateFeed(){ var id = 0; id = $('#feeds li:last').data('id'); $.ajax({ 'url' : '/ajax_results.cfm?ajax_type=get_site_feed', 'type' : 'POST', 'data' : { 'latest_news_time' : id, 'f_member_id_recipient': '5', 'use_feed_type' : '1,2,3,4,5,6,7,9,12,13,14,15,16,17,18,19,20,21,22', 'use_class_id' : '1,2,3,4' }, success : function(data){ setTimeout('updateFeed()', 1000); if(id != 0){ $(data).appendTo("#feeds ul"); } } }) }; </script>hi, I have fixed 3 problems in issues
I have fixed 3 problems in issues:
- block when request
- pass page number to contentPage with GET method
- trigger scroll at first time
Here is my code and demo: https://github.com/yijingping/jquery-scroll-pagination
And also, I have made a pull requests, check the diffirences here: https://github.com/yijingping/jquery-scroll-pagination/commit/3d6e718c01e13ee60fde21a54ab8d80a8d9d3de2
Bower
Support it :)
Restrict out put result to a define no of content
Is there any way where I can only show a no of result instead of repeating the same content as given in the example? For example, I want to show only 20 result out of 100 first time and when user scroll down then next 20 and so on.
After reloading getting the same result (repeat)
Love it but I'm confused on how to get the next row of results on the democontent.php. When the div reloads I have the same 10 results.
Think others find it useful.
Thanks in advance.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.