Browse files

Manual triggering: Hide navSelector when end of content reached

  • Loading branch information...
1 parent 5e22b71 commit 797db59a18424e815989a7261a04e4aad99dda8f @samcleaver samcleaver committed Aug 6, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 behaviors/manual-trigger.js
View
20 behaviors/manual-trigger.js
@@ -34,6 +34,26 @@ $.extend($.infinitescroll.prototype,{
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');
+
}
});

0 comments on commit 797db59

Please sign in to comment.