Skip to content

Instantly share code, notes, and snippets.

View imana97's full-sized avatar

Iman Far imana97

View GitHub Profile
@imana97
imana97 / js-queue.js
Last active August 29, 2015 14:00
queueing function execution in javascript
var Queue = function() {
// copy this to self
var self = this;
//initiating an empty queue
self.queue = [];
//initiating an empty object for to keep the last json data fetched by ajax
self.lastData = null;
// this methods add a function to the queue
self.next = function(func) {