https://github.com/0xandre/xjs
https://github.com/0xandre/xjs
contribute css dom html html5 javascript js library xjs
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/0xandre/xjs
- Owner: 0xAndre
- License: mit
- Created: 2018-08-23T15:18:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-24T10:54:07.000Z (almost 8 years ago)
- Last Synced: 2025-08-10T11:42:38.881Z (11 months ago)
- Topics: contribute, css, dom, html, html5, javascript, js, library, xjs
- Language: JavaScript
- Size: 1.12 MB
- Stars: 1
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xJS - Javascript Library
[](https://github.com/x0uter/xJS)
Make it simple.
## How to Use
Add xJS Library to your HTML file
```html
```
or
```html
```
## Examples
```js
x('url').attr('href', 'https://www.github.com')
```
## CSS
```js
x('test').css('color', 'red');
x('div').css('color', 'blue');
```
### CSS as Object
```js
const {
'color': 'blue',
'text-align': 'center'
}
x('test').css(decor);
```
## JSON GET
```js
x().jsonGet('https://jsonplaceholder.typicode.com/todos/1').then(x('test').add)
x('test').jsonGet('https://jsonplaceholder.typicode.com/todos/1');
```
## JSON POST
```js
x().jsonPost('URI', {'id': 1, 'xjs': 'nice'})
```
## SUM
```html
4
4
5
2
1
4
Result:
```
```js
x('res').sum(['val1', 'val2', 'val3', 'val4', 'val5', 'div'])
```
```html
Result: 20
```
License
----
[]