Blog - load article from ajax

1 reply · opened Nov 12, 2016

Ddream7net591Nov 12, 2016

I am using the layout from blog-grid-2.php (Blog entries with 2 column)
By default, first 6 article will be loaded, and I want to get more articles when scroll to the bottom.
I finished the code in server side part, but when I just append the HTML code by JavaScript, the article aren't shown correctly as It will overlap the original one instead of append to the bottom.

So how can I do, is there any JavaScript function can re-init the state?

SSemicolon WebSTAFFNov 14, 2016

Hello,

The Functionality which you are trying to use is called Infinity Scroll and an example for this is already available with the Package: http://themes.semicolonweb.com/html/canvas/blog-timeline.php . Please consider using the Template blog-timeline.html Template from the Package/HTML Folder which has this Functionality.

Additionally, if you are looking to use your Own Functionality for this, it is also definitely possible to ReInitialize the Blog Article's Positions. Please add the .grid-container Class to the #posts Container and then simply trigger the following JS function on Callback after the Articles have been added:

jQuery('.grid-container').isotope('layout');

Hope this Helps. Thanks for your Patience.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard