1.0.4 • Published 4 years ago

ajax-feed v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Ajax Feed Javascript Package

Example Usage

let portfolioFeed = new AjaxFeed({
	'baseUrl': site_info.ajax_url,
	'action': 'portfolio_feed',
	'container': $('.portfolio-feed'),
	'filterForms': $('.portfolio-feed-filters'),
	'paginationContainer':$('.portfolio-feed-pagination'),
	'paginationDataAttribute': 'data-ajax-page',
	'submitOnFilterUpdate': false,
});

Example Server Response

let response = {
	'html': 'HTML Response that will populate the container',
	'pagination': 'HTML response that will populate the pagination container',
	'currentPage': 'the current page',
	'maxPages': 'the total amount of pages in the current query'
	'posts':'The raw post data that was returned by the query'
};

Settings

Methods

Events

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago