https://github.com/prozi/antiquery
you dont need big-ass-query this is small and works
https://github.com/prozi/antiquery
Last synced: over 1 year ago
JSON representation
you dont need big-ass-query this is small and works
- Host: GitHub
- URL: https://github.com/prozi/antiquery
- Owner: Prozi
- Created: 2017-10-09T00:36:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:18:37.000Z (over 3 years ago)
- Last Synced: 2024-09-29T09:06:56.677Z (over 1 year ago)
- Language: JavaScript
- Size: 296 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Anti-Query
You dont need any Big-Ass-Query that weights about 50KB, this library is enough for your needs (probably)
## Whats this
this is DOM manipulation language
## Installation
install by typing
```bash
yarn add antiquery --save
# or
npm install antiquery --save
```
## What is the usage
to use as import/export module use
```javascript
import $ from 'antiquery'
```
for older javascript use:
```javascript
// es2015 compiled with babel
const $ = require('antiquery/es2015').default
// es6
const $ = require('antiquery').default
```
for browser just use with webpack/backpack dont just include as one of 100's script src's like in 20'th century
...
then you can use like
```javascript
$('div.golden')
.removeClass('golden')
.css({ background: 'black', color: 'white' })
.text('hello')
.animate('blink')
.show()
```
## What is ready?
* what document.querySelector supports (a lot in current browsers)
* chaining next methods
* methods:
* get (index: Number? or returns all)
* each (fn: Function)
* parents
* children
* find
* remove
* addClass (className: String)
* removeClass (className: String)
* css (css: Object)
* hide
* show
* text (text: String)
* html (html: String)
* animate (className: String, ms: Number)
animate adds css class for duration of ms
## Enjoy
by Jacek Pietal [github.com/Prozi](https://github.com/Prozi)
## License
MIT