# jqlite

> Tiny JavaScript DOM query library

Latest version **0.2.42** (published 2017-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install jqlite
pnpm add jqlite
yarn add jqlite
bun add jqlite
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.42 |
| Published | 2017-04-28 |
| First published | 2014-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 99 |
| Author | Jesús Germade |
| Maintainers | jgermade |
| Keywords | javascript, query, dom |

## Links

- npm: https://www.npmjs.com/package/jqlite
- Repository: https://github.com/jstools/jqlite
- Issues: https://github.com/jstools/jqlite/issues
- npm.io page: https://npm.io/package/jqlite

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.2.42 (latest) — 2017-04-28
- 0.2.41 — 2016-12-12
- 0.2.40 — 2016-11-14
- 0.2.39 — 2016-06-28
- 0.2.38 — 2016-06-13
- 0.2.37 — 2016-04-29
- 0.2.36 — 2016-04-07
- 0.2.34 — 2016-01-22
- 0.2.33 — 2015-12-08
- 0.2.32 — 2015-12-07
- 0.2.31 — 2015-11-24
- 0.2.30 — 2015-11-24
- 0.2.29 — 2015-11-23
- 0.2.28 — 2015-11-23
- 0.2.27 — 2015-11-10
- … 62 more at https://npm.io/package/jqlite/versions

## README

# jqLite

Tiny JavaScript DOM query library that uses pure CSS selectors

[![](https://img.shields.io/npm/v/jqlite.svg)](https://www.npmjs.com/package/jqlite) [![](https://img.shields.io/bower/v/jstools-jqlite.svg)](http://bower.io/search/?q=kiltjs-jqlite) [![Build Status](https://travis-ci.org/kiltjs/jqlite.svg?branch=master)](https://travis-ci.org/kiltjs/jqlite) [![](https://img.shields.io/npm/dm/jqlite.svg)](https://www.npmjs.com/package/jqlite)


-----------

## Installation

```.sh
npm install jqlite --save
```
  or
```.sh
bower install kilt-jqlite --save
```
-----------

## Main Object

> jqlite object ($)

``` js

  // starting by '<' returns a collection of DOM nodes from this code
  // result: [<HTMLElement>]
  $('<div class="foo">bar</div>');

  // also accepts several objects at root level
  // result: [<HTMLElement>, <HTMLElement>]
  $('<div class="foo">bar</div><div class="bar">foo</div>');

  // jqlite selectors returns collection by accepting pure css selectors
  // jQuery uses sizzlejs to parse selectors
  $('#some-id');
  $('.some-class');
  $('#wrapper .item');
```

## Main Methods

- [x] [`ready()`](http://api.jquery.com/ready/)

## Relative Queries

- [`get()`](docs/relative-queries.md#getposition--apijquerycomget)
- [`eq()`](docs/relative-queries.md#eqposition--apijquerycomeq)
- [`first()`](docs/relative-queries.md#first--apijquerycomfirst)
- [`last()`](docs/relative-queries.md#last--apijquerycomlast)
- [`find()`](docs/relative-queries.md#findselector--apijquerycomfind)
- [`closest()`](docs/relative-queries.md#closestselector--apijquerycomclosest)

> missing docs:

- [`prev()`](http://api.jquery.com/next/)
- [`prevAll()`](http://api.jquery.com/next/)
- [`next()`](http://api.jquery.com/next/)
- [`nextAll()`](http://api.jquery.com/next/)

- [`parent()`](http://api.jquery.com/parent/)
- [`children()`](http://api.jquery.com/children/)

### Handling Classes

- [`addClass()`](docs/relative-queries.md#addclassclassname--apijquerycomaddclass)
- [`removeClass()`](docs/relative-queries.md#removeclassclassname--apijquerycomremoveclass)
- [`toggleClass()`](docs/relative-queries.md#toggleclassclassnamestate--apijquerycomtoggleclass)

### Moving DOM Elements

> missing docs:

- [`append()`](http://api.jquery.com/append/)
- [`prepend()`](http://api.jquery.com/prepend/)
- [`before(content)`](http://api.jquery.com/before/)
- [`after(content)`](http://api.jquery.com/after/)

- [`wrap()`](http://api.jquery.com/wrap/)

- [`replaceWith()`](http://api.jquery.com/replaceWith/)
- [`detach()`](http://api.jquery.com/detach/)
- [`remove()`](http://api.jquery.com/remove/)

### Getters / Setters

- [`val()`](http://api.jquery.com/val/)
- [`html()`](http://api.jquery.com/html/)
- [`text()`](http://api.jquery.com/text/)
- [`contents()`](http://api.jquery.com/contents/)

- [`prop()`](http://api.jquery.com/prop/)
- [`attr()`](http://api.jquery.com/attr/)
- [`removeAttr()`](http://api.jquery.com/removeAttr/)
- [`data()`](http://api.jquery.com/data/)
- [`removeData()`](http://api.jquery.com/removeData/)

- [`empty()`](http://api.jquery.com/empty/)

### Miscelanea

- [`clone()`](http://api.jquery.com/clone/) - clone events not yet supported
- [`css()`](http://api.jquery.com/css/)

### Event Methods

- [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData
- [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors
- [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors
- [`trigger()`](http://api.jquery.com/trigger/) - Does not support selectors

- [`click()`](http://api.jquery.com/click/)
- [`focus()`](http://api.jquery.com/focus/)
- [`blur()`](http://api.jquery.com/blur/)
- [`submit()`](http://api.jquery.com/submit/)

> <a name="foot-notes">
> collection: jqlite object returned by a query and find/filter like functions

---
_Source: https://npm.io/package/jqlite · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
