Minified version < 6KB
lightDom is a lightweight "jQuery" like dom library which is targeting only modern browsers including iOS and Android devices.
lightDom brings a complete set of DOM manipulating functions, while remaining light. It finds its place in the projects for which jQuery may be considered too heavy but a DOM library is also needed.
Build using Grunt or uglifyjs. By default the alias to $ is not included.
grunt default: build core + pluginsgrunt noPlugin: includes only core- Add
--with_dollar_aliasto include$alias.
lightDom,LD or optionnal $.
Usage is similar to jQuery:
- Selector:
LD("selector")orLD(element) - Creating a new object:
LD("<div></div>")
-
CustomEventpolyfill -
lightDom.ajax: make an Ajax request -
lightDom.isTouchDevice: returns a boolean which indicates wether the devices has touch events or not -
lightDom.extend: extend the lightDom object.
- each
- find
- parent
- addClass
- removeClass
- hasClass
- attr
- css
- bind
- unbind
- append
- prepend
- html
- text
- width
- outerWidth
- height
- outerHeight
- position