Skip to content
A jQuery-compatible and non-All-in-One library which is more "Zepto" than Zepto.js http://ozjs.org/DollarJS/
JavaScript
Find file
Latest commit 9dd6f4d @dexteryy remove indent

README.md

DollarJS

  • A jQuery-compatible and non-All-in-One library which is more "Zepto" than Zepto.js
  • Focus on DOM operations and mobile platform, wrap native API wherever possible.

For Android 2.x or ie9+ (beta)

define("dollar", ["dollar/android23"], function($){
    return $;
});

For jQuery

define("dollar", ["dollar/jquery"], function($){
    return $;
});

Usage

AMD and OzJS

Get the code

Add to your project as new dependency

Or download directly from Github

Dependencies

Examples

Under construction...

API and usage

var $ = require('dollar');
  • $() --

API inherited from Array.prototype

  • support all Array methods

API for traversing

  • find() --
  • eq() --
  • not() --
  • matches() --
  • has() --
  • parent() --
  • parents() --
  • closest() --
  • siblings() --
  • next() --
  • nextAll() --
  • nextUntil() --
  • prev() --
  • prevAll() --
  • prevUntil() --
  • children() --
  • contents() --

API for detection

  • is() --
  • hasClass() --

API for properties

  • addClass() --
  • removeClass() --
  • toggleClass() --
  • attr() --
  • removeAttr() --
  • prop() --
  • removeProp() --
  • data() --
  • removeData() --
  • val() --
  • empty() --
  • html() --
  • text() --
  • css() --
  • hide() --
  • show() --

API for dimensions

  • offset() --
  • width() --
  • height() --
  • scrollLeft() --
  • scrollTop() --

API for manipulation

  • appendTo() --
  • append() --
  • prependTo() --
  • prepend() --
  • insertBefore() --
  • before() --
  • insertAfter() --
  • after() --
  • replaceAll() --
  • replaceWith() --
  • wrap(boxes) --
  • wrapAll() --
  • wrapInner() --
  • unwrap() --
  • clone() --
  • remove() --

API for event

  • one() --
  • on() --
  • off() --
  • trigger() --

API for miscellaneous

  • end() --
  • each() --

Public static API

  • $.matchesSelector | $.matches --
  • $.contains --
  • $.createNodes --
  • $.camelize --
  • $.dasherize --
  • $.Event --

Why not add XXX

  • $.ajax() --
  • $.when() --
  • $.type() --
  • $.isArray() --
  • $.proxy() --
  • $.extend() --
  • $.fn.ready() --
  • $.fn.animate() --
  • $.fn.delegate() --
  • $.fn.map() --
  • $.fn.data(object) --
  • $.fn.detach(object) --

Under construction...

More References

See OzJS Project Homepage

Release History

See OzJS Release History

License

Copyright (c) 2010 - 2013 dexteryy
Licensed under the MIT license.

Something went wrong with that request. Please try again.