I am now trying to set infinite scrolls on my site for days. Finally I get a plugin that works almost -
Problem : When you scroll down, the newly loaded posts are placed on the ones displayed.
Solution Suggestions? It may be by the fact that my subject uses Java, Mason for the grid display and I get the code snippet to deal with it.
Maybe I dubbed them wrong?
I added it to the lower part of my work php and jetpack to encrypt the script
// jetpack infinite j S aden wp_register_script ('ininite-addon', (get_template_directory_uri ()), "infinite-add-on", false, true); Wp_enqueue_script ('infinite-add-on'); // JetPack Infinite Scroll add_theme_support ('Infinite-scroll', array ('container' = & gt; post-field ',' footnote '= & gt;' footnote ',' wrapper '= & gt; wrong,' posts_per_page '= & Gt; '7',));
And this file is what I had called infinite- addon.js, the tutorial is outlined above:
jQuery (document) .ready (function ($) triggers re-layout on infinite_count = 0; // infinite scroll $ (document.body). ', Function () {infinite_count = infinite_count + 1; var $ container = $ (' # content '); var $ selector = $ (' # infinite-view- '+ infinite_count); var $ Skin = $ Selector.find ( '. Hentry'); $ elements.hide (); $ container. Masonry ( 'aided', $ element, true); $ elements. Fade In ();});});
Thanks a lot for any help !!! And tell me if you need more code!
issue resolved
$ (document) .ready (Function () {$ ('# post-area') masonry ({// option item selector: '.post', // option ... is unauthorized: true, animation options: {duration: 400, easy: ' Linear ', line: wrong}});}};
I removed it and replaced it with snippet from top And now it works like magic!
Comments
Post a Comment