-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added infinite scroll, removed unused functions, updated font awesome
- Loading branch information
1 parent
3ce8295
commit 7907ca2
Showing
6 changed files
with
77 additions
and
4 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
-------------------------------- | ||
Infinite Scroll Behavior | ||
Manual / Twitter-style | ||
-------------------------------- | ||
+ https://github.com/paulirish/infinitescroll/ | ||
+ version 2.0b2.110617 | ||
+ Copyright 2011 Paul Irish & Luke Shumard | ||
+ Licensed under the MIT license | ||
+ Documentation: http://infinite-scroll.com/ | ||
*/ | ||
|
||
(function($, undefined) { | ||
$.extend($.infinitescroll.prototype,{ | ||
|
||
_setup_twitter: function infscr_setup_twitter () { | ||
var opts = this.options, | ||
instance = this; | ||
|
||
// Bind nextSelector link to retrieve | ||
$(opts.nextSelector).click(function(e) { | ||
if (e.which == 1 && !e.metaKey && !e.shiftKey) { | ||
e.preventDefault(); | ||
instance.retrieve(); | ||
} | ||
}); | ||
|
||
// Define loadingStart to never hide pager | ||
instance.options.loading.start = function (opts) { | ||
opts.loading.msg | ||
.appendTo(opts.loading.selector) | ||
.show(opts.loading.speed, function () { | ||
instance.beginAjax(opts); | ||
}); | ||
} | ||
}, | ||
_showdonemsg_twitter: function infscr_showdonemsg_twitter () { | ||
var opts = this.options, | ||
instance = this; | ||
|
||
//Do all the usual stuff | ||
opts.loading.msg | ||
.find('img') | ||
.hide() | ||
.parent() | ||
.find('div').html(opts.loading.finishedMsg).animate({ opacity: 1 }, 2000, function () { | ||
$(this).parent().fadeOut('normal'); | ||
}); | ||
|
||
//And also hide the navSelector | ||
$(opts.navSelector).fadeOut('normal'); | ||
|
||
// user provided callback when done | ||
opts.errorCallback.call($(opts.contentSelector)[0],'done'); | ||
|
||
} | ||
|
||
}); | ||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters