Giter Site home page Giter Site logo

jquery-ajax-queue's Introduction

jQuery-Ajax-Queue is a simple plugin that allows you to queue either 
the ajax calls in the order that you pass them to the queue or queue
the callbacks so they execute in order but the ajax requests themselves are 
executed asap.

Basic Use:
Works just like $.ajax() in jQuery http://api.jquery.com/jQuery.ajax/
except that you use $.ajaxQueue()

You can pass 3 parameters.
The first parameter is required.  It will be a JSON object formatted with all
the usual jQuery options.

The second is optional (unless you also want to change the mode) and defines a 
queue name.  It will default to 'ajax' as the queue name.  This is so you 
can have multiple queues and it might be a good idea to always set this.

The third is optional.  If it is set to the string 'sync' then each request 
will be sent to the server in the order they are called.  Each request will
sent after the previous ajax call completes.  It is like you made a sychronous
request to the server except that your javascript will keep executing from the
point where $.ajaxQueue was called.  If this param is set to 'async', it will 
send all the requests to the server as soon as $.ajaxQueue is called but the
callbacks will all execute in the order that the calls were made.

Credits:
Thanks to the jQuery Community for all that they have helped to create.
Thanks to elevenHuang via github for his fix to execute the original complete callback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.