Skip to content

A jQuery-compatible and non-All-in-One library which is more "Zepto" than Zepto.js

Notifications You must be signed in to change notification settings

dexteryy/DollarJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A jQuery-compatible and non-All-in-One library which is more "Zepto" than Zepto.js

Resources

Stars

Watchers

Forks

Packages

No packages published