update inf. scroll; fix pagniation showing/not showing in all the wrong places

This commit is contained in:
maxwell 2011-01-25 17:38:29 -08:00
parent 43fa30248c
commit 4e60d2b92e
5 changed files with 9 additions and 7 deletions

View file

@ -4,7 +4,7 @@ $('a[rel*=facebox]').facebox();
$(document).ready(function() {
$('#main_stream').infinitescroll({
navSelector : "div.pagination",
navSelector : "#main_stream + div.pagination",
// selector for the paged navigation (it will be hidden)
nextSelector : ".pagination a.next_page",
// selector for the NEXT link (to page 2)

View file

@ -15,5 +15,4 @@
= render 'shared/stream', :posts => @fakes
%a.more-link.paginate{:href => '#'}
%h2= t("more")
#small{:style => "font-size:x-small"}
= will_paginate @posts

View file

@ -1,12 +1,13 @@
$(document).ready(function() {
$('#main_stream').infinitescroll({
navSelector : "div.pagination",
navSelector : ".pagination",
// selector for the paged navigation (it will be hidden)
nextSelector : ".pagination a.next_page",
// selector for the NEXT link (to page 2)
itemSelector : "#main_stream .stream_element",
// selector for all items you'll retrieve
bufferPx: 300,
debug: true,
donetext: "no more.",
loadingText: "",
loadingImg: '/images/ajax-loader.gif'
@ -19,8 +20,9 @@ $(document).ready(function() {
});
$(window).unbind('.infscr');
$('#main_stream + .pagination').hide();
$("a.paginate").live("click", function() {
$(this).css("display", "none");
$(document).trigger("retrieve.infscr");
});
});

View file

@ -6,6 +6,7 @@
var Mobile = {
initialize: function() {
$("abbr.timeago").timeago();
$('#main_stream + .pagination').hide();
$('#aspect_picker').change(Mobile.changeAspect);
},

File diff suppressed because one or more lines are too long