update inf. scroll; fix pagniation showing/not showing in all the wrong places
This commit is contained in:
parent
43fa30248c
commit
4e60d2b92e
5 changed files with 9 additions and 7 deletions
|
|
@ -4,7 +4,7 @@ $('a[rel*=facebox]').facebox();
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#main_stream').infinitescroll({
|
$('#main_stream').infinitescroll({
|
||||||
navSelector : "div.pagination",
|
navSelector : "#main_stream + div.pagination",
|
||||||
// selector for the paged navigation (it will be hidden)
|
// selector for the paged navigation (it will be hidden)
|
||||||
nextSelector : ".pagination a.next_page",
|
nextSelector : ".pagination a.next_page",
|
||||||
// selector for the NEXT link (to page 2)
|
// selector for the NEXT link (to page 2)
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,4 @@
|
||||||
= render 'shared/stream', :posts => @fakes
|
= render 'shared/stream', :posts => @fakes
|
||||||
%a.more-link.paginate{:href => '#'}
|
%a.more-link.paginate{:href => '#'}
|
||||||
%h2= t("more")
|
%h2= t("more")
|
||||||
#small{:style => "font-size:x-small"}
|
|
||||||
= will_paginate @posts
|
= will_paginate @posts
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#main_stream').infinitescroll({
|
$('#main_stream').infinitescroll({
|
||||||
navSelector : "div.pagination",
|
navSelector : ".pagination",
|
||||||
// selector for the paged navigation (it will be hidden)
|
// selector for the paged navigation (it will be hidden)
|
||||||
nextSelector : ".pagination a.next_page",
|
nextSelector : ".pagination a.next_page",
|
||||||
// selector for the NEXT link (to page 2)
|
// selector for the NEXT link (to page 2)
|
||||||
itemSelector : "#main_stream .stream_element",
|
itemSelector : "#main_stream .stream_element",
|
||||||
// selector for all items you'll retrieve
|
// selector for all items you'll retrieve
|
||||||
bufferPx: 300,
|
bufferPx: 300,
|
||||||
|
debug: true,
|
||||||
donetext: "no more.",
|
donetext: "no more.",
|
||||||
loadingText: "",
|
loadingText: "",
|
||||||
loadingImg: '/images/ajax-loader.gif'
|
loadingImg: '/images/ajax-loader.gif'
|
||||||
|
|
@ -19,8 +20,9 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).unbind('.infscr');
|
$(window).unbind('.infscr');
|
||||||
|
$('#main_stream + .pagination').hide();
|
||||||
|
|
||||||
$("a.paginate").live("click", function() {
|
$("a.paginate").live("click", function() {
|
||||||
$(this).css("display", "none");
|
|
||||||
$(document).trigger("retrieve.infscr");
|
$(document).trigger("retrieve.infscr");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
var Mobile = {
|
var Mobile = {
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
$("abbr.timeago").timeago();
|
$("abbr.timeago").timeago();
|
||||||
|
$('#main_stream + .pagination').hide();
|
||||||
$('#aspect_picker').change(Mobile.changeAspect);
|
$('#aspect_picker').change(Mobile.changeAspect);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
4
public/javascripts/vendor/jquery.infinitescroll.min.js
generated
vendored
4
public/javascripts/vendor/jquery.infinitescroll.min.js
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue