From 6ddd9579cfb96e4238c312b91b7ef5b2832ab164 Mon Sep 17 00:00:00 2001 From: hughker Date: Sat, 15 Aug 2015 11:29:53 -0400 Subject: [PATCH] Updating Read Me + Example Code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The example code would originally not remove the `loader` after it had successfully loaded the new content. - By swapping the placement, it now removes the `loader` after the page has successfully loaded the new content - You can see here to see it in action with the revised code » http://b-b-dev.myshopify.com/blogs/journal --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5719ed6..2b7fdcb 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,15 @@ Options ``` javascript Selector:{ ParentProductWrapper: 'PARENTSELECTOR', // The main wrapper - Product:'ChildSelector', // product items + Product:'ChildSelector', // product items NextPageLink:'NextPageLinkSelector', // Next page link, should be unique on the page PreviousPageLink:'PreviousPageLinkSelector', // Previous page link, should be unique on the page }, CallBackBeforePageLoad:function(){}, // executed before the next page is loaded CallBackOnPageLoad:function(){}, // executed after a next page has been loaded CallBack:function(){}, // executed after all next pages have been loaded - ``` + ``` HTML {% if template contains 'collection' %} {{ 'tricky3.infinitescroll.v1.js' | asset_url | script_tag }} @@ -36,16 +36,16 @@ CallBack:function(){}, // executed after all next pages have been loaded EnableHasherModule:true, // adds hash tags on the window location href for URL bookmarks CallBack:function(){}, CallBackOnPageLoad:function(){ - // example showing a loading image - // $('PARENTSELECTOR').append('
'); + // removing the loading image + // $('LOADING-IMAGE-CLASS').remove(); }, CallBackBeforePageLoad:function(){ - // removing the loading image - // $('PARENTSELECTOR LOADING-IMAGE-CLASS').remove(); + // example showing a loading image + // $('PARENTSELECTOR').append('
'); } }; $(PARENTSELECTOR).TrickyInfiniteScroll(options); }); {% endif %} -``` \ No newline at end of file +```