Note that there are some explanatory texts on larger screens.

plurals
  1. POinfinite scroll manual trigger
    primarykey
    data
    text
    <p>Just doesn't seem to work... :-( Have seen more complaints about it but I can't find the answer.</p> <p><strong>The Problem:</strong> Infinite scroll works but not the manual trigger. When I click the link, nothing happens. Firebug gives </p> <p><a href="http://www.infinite-scroll.com/" rel="noreferrer">Infinite Scroll</a></p> <p><strong>My code:</strong></p> <pre><code> &lt;?php echo ('&lt;ul id="infinite"&gt;'); ?&gt; &lt;?php $wp_query = new WP_Query(); $wp_query-&gt;query('paged='.$paged.'&amp;cat=5&amp;showposts=3&amp;meta_key=video_video&amp;orderby=meta_value&amp;order=ASC' . $post-&gt;ID); while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post(); ?&gt; &lt;?php if ( get_post_meta($post-&gt;ID, 'video_video', true) ) : ?&gt; &lt;li class="video"&gt;&lt;?php $home = array("h" =&gt; 290, "w" =&gt; 380, "zc" =&gt; 1, "q" =&gt;100); //echo get('video_video'); echo ('With: '); echo get('participant_first_name'); echo ('&amp;nbsp;'); echo get('participant_last_name'); echo ('&lt;/li&gt;');?&gt; &lt;?php endif;?&gt; &lt;?php endwhile;?&gt; &lt;?php if (get_post_meta($post-&gt;ID, 'video_video', true) ) { ?&gt; &lt;?php if ($wp_query-&gt;max_num_pages &gt; 1) : ?&gt; &lt;nav id="nav-below" &gt; &lt;div id="next" &gt; &lt;?php next_posts_link( __( 'Scroll down for more', 'intowntheme' ) ); ?&gt;&lt;/div&gt; &lt;/nav&gt; &lt;?php endif; //end nav ?&gt; &lt;?php } else { ?&gt; &lt;p&gt;There are no interviews at the moment &lt;/p&gt; &lt;?php } ?&gt; &lt;/ul&gt; </code></pre> <p><strong>And my script:</strong></p> <pre><code>jQuery('ul#infinite').infinitescroll({ navSelector : "#next", // selector for the paged navigation (it will be hidden) nextSelector : "#next a", // selector for the NEXT link (to page 2) itemSelector : "ul#infinite li", // selector for all items you'll retrieve errorCallback: function() { // fade out the error message after 2 seconds $('#infscr-loading').animate({opacity: 0.8},2000).fadeOut('normal'); }, loading : { msgText: "&lt;em&gt;Loading the next year of Grantees...&lt;/em&gt;", finishedMsg: "&lt;em&gt;You've reached the end of the Interviews.&lt;/em&gt;" }, }); //kill scroll binding jQuery(window).unbind('.infscr'); //setTimeout("jQuery('#next').slideDown();", 1000); //hook up the manual click guy. jQuery('#next a').click(function(){ jQuery('#next a').infinitescroll('retrieve.infscr'); return false; }); </code></pre> <p><strong>also tried</strong> </p> <pre><code>jQuery(document).trigger('retrieve.infscr'); </code></pre> <p><strong>instead of</strong></p> <pre><code>jQuery('#next a').infinitescroll('retrieve.infscr'); </code></pre> <p><strong>but no luck.</strong></p> <p>Firebug then says <em><code>trigger(retrieve.infscr) called incorrectly</code></em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload