dquery

A user friendly rewrite of jQuery


Keywords
jquery, events, dom
License
MIT
Install
bower install dquery

Documentation

dQuery

dQuery is a extremely lightweight DOM Manipulation library (like jQuery). Because dQuery uses vanilla API for complex operations, It's fast as hell and just a few kbs (unminified).

dQuery doesn't aim to be API compatible with jQuery, You will have to alter your app to use the new APIs to achieve super performance.

if you know jQuery, then you already know dQuery, it's the same thing, Even the same function names, just a bit optimized.

Ajax

dQuery's Ajax API is different than jQuery's, dQuery uses Promises instead of success and error callbacks. An example usage would be

$.ajax({
  url: "/",
  type: "POST",
  dataType: "JSON",
  data: {key: "value"}
}).then(function(Result){
  console.log(Result);
}).catch(function(Error){
  console.log(Error);
});
// or maybe
$.post('/', {key: "value"}).then(JSON.parse).then(function(Result){
  console.log(Result);
}).catch(function(Error){
  console.log(Error);
});

License

This project is licensed under the terms of MIT License. See the LICENSE file for more info.