jquery - Infinite scroll 'couldn't parse your Next (Previous Posts) URL' despite correct path being parsed -



jquery - Infinite scroll 'couldn't parse your Next (Previous Posts) URL' despite correct path being parsed -

i've got page setup infinite scroll on , was, lastly time looked, working without issue.

i've gone today , cannot parse next selector. i'm getting next debug;

sorry, couldn't parse next (previous posts) url. verify css selector points right tag. if still error: yell, scream, , kindly inquire help @ infinite-scroll.com.

but log few extras things working , 'determinepath' right path next link;

["determinepath", "/en-gb/news-media/videos/videos/"] pixelsfromnavtobottom: 663 ["binding", "bind"]

my js looks this;

<script type="text/javascript"> (function($) { $(document).ready(function() { var container = $('.masonry'), masonry; // masonry stuff goes on here container.infinitescroll({ debug: true, navselector : '#panel-area ul.navigation', nextselector : '#panel-area ul.navigation li.child.descendant a:first', itemselector : '#panel-area div.item.video', loading: { finishedmsg: 'no more pages load.', img: 'http://i.imgur.com/6rmhx.gif' } }, // trigger masonry callback function( newelements ) { // hide new items while loading var $newelems = $( newelements ).css({ opacity: 0 }); // ensure videos load before adding masonry layout $newelems.imagesloaded(function(){ // show videos they're ready $newelems.animate({ opacity: 1 }); container.masonry( 'appended', $newelems, true ); }); } ); }); })(jquery); </script>

html;

<div id="panel-area" class="gallery_grid"> <div class="masonry js-masonry"> <div class="item video 2280" data-video-id="2280"></div> </div> <ul class="navigation"> <li class="child descendant"> <a href="/en-gb/news-media/videos/videos/">14/04/2014</a> </li> <li class="child descendant"> <a href="/en-gb/news-media/videos/1342014/">13/4/2014</a> </li> </ul> </div>

as can see, href of first link correctly parsed , assigned "determinepath". furthermore, when apply jquery selectors in console each returns expect.

i've tried include pathparse, loads none existent url ;

pathparse: function () { var path = $('#panel-area ul.navigation li a:first').attr('href'); homecoming [path, ''] }

that performs request on /en-gb/news-media/videos/videos/2/ doesn't exist :(

where going wrong?

you need provide "path" of url if url fixed. it's there in alternative list of infinite scroll js

for illustration -

path:function generatepageurl(currentpagenumber) { homecoming ("/path/to/resource/page/" + currentpagenumber + "/html"); }

jquery infinite-scroll

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -