1.1.0 • Published 8 years ago

periodic.js v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

periodic.js

Install

  • npm install --save periodic.js

Usage

import PeriodicJS from 'periodic.js';

const displaySelector = '.periodic';
const periodic = PeriodicJS({
	duration: 3000,
	displaySelector,
	callback: fetchData
});

function fetchData(done) {

	// tell user we are fetching data
	var element = document.querySelector(displaySelector);
	element.innerHTML = 'updating';

	setTimeout(done, 3000);
}

Also add an element with the displaySelector class you provided earlier:

<p class='periodic'></p>
1.1.0

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago