https://github.com/exposedcat/xquery
Lightweight JQuery replacement
https://github.com/exposedcat/xquery
Last synced: 7 months ago
JSON representation
Lightweight JQuery replacement
- Host: GitHub
- URL: https://github.com/exposedcat/xquery
- Owner: ExposedCat
- Created: 2021-10-02T12:44:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-02T19:55:53.000Z (over 4 years ago)
- Last Synced: 2025-03-12T04:41:22.082Z (10 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# XQuery
[](https://github.com/ExposedCat/xquery)
[XQuery](https://github.com/ExposedCat/xquery/blob/main/xquery.js) is lightweight JQuery replacement
## API
### XQuery
You can use `$` function to create new XQuery instance.
Using `XQuery` you can access one or more HTML elements and/or do any stuff with it.
```js
$(selector)
```
#### Parameters
| Parameter | Type | Description |
| :--- | :--- | :--- |
| `selector` | `string` | **Required**. Element(s) selector |
#### Methods
- `do(func)` - Execute function for each selected element.
| Parameter | Type | Description |
| :--- | :--- | :--- |
| `func` | `Function` | **Required**. Function to be executed |
- `unwrap()` - Returns selected element(s).