jmontoyaa 0030835069 move assets to public new symfony structure | 7 years ago | |
---|---|---|
.. | ||
dist | 7 years ago | |
libs | 7 years ago | |
src | 7 years ago | |
test | 7 years ago | |
.bower.json | 7 years ago | |
.gitignore | 7 years ago | |
.jshintrc | 7 years ago | |
Gruntfile.js | 7 years ago | |
LICENSE-MIT | 7 years ago | |
README.md | 7 years ago | |
ajaxQueue.jquery.json | 7 years ago | |
package.json | 7 years ago |
The release version of the code is found in the dist/
directory.
In your web page:
<script src="jquery.js"></script>
<script src="dist/jquery.ajaxQueue.min.js"></script>
<script>
jQuery.ajaxQueue({
url: "/ajax",
dataType: "json"
}).done(function( data ) {
// ...
});
</script>
jQuery.ajaxQueue( options )
Takes the same parameters as jQuery.ajax, returns a promise. Note that the return value is not a jqXHR
, but it will behave like one. The abort()
method on the return value will remove the request from the queue if it has not begun, or pass it along to the jqXHR's abort method once the request begins.
(Coming soon)
Copyright (c) 2013 Corey Frang
Licensed under the MIT license.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
Please don't edit files in the dist
subdirectory as they are generated via grunt. You'll find source code in the src
subdirectory!
While grunt can run the included unit tests via PhantomJS, this shouldn't be considered a substitute for the real thing. Please be sure to test the test/*.html
unit test file(s) in actual browsers.
This assumes you have node.js and npm installed already.
grunt --version
at the command-line.npm install -g grunt
to install the latest version. You may need to run sudo npm install -g grunt
.npm install
to install the project's dependencies.In order for the qunit task to work properly, PhantomJS must be installed and in the system PATH (if you can run "phantomjs" at the command line, this task should work).
Unfortunately, PhantomJS cannot be installed automatically via npm or grunt, so you need to install it yourself. There are a number of ways to install PhantomJS.
Note that the phantomjs
executable needs to be in the system PATH
for grunt to see it.