An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# xJS - Javascript Library



[![N|Solid](https://github.com/x0uter/xJS/raw/master/assets/xjs.gif)](https://github.com/x0uter/xJS)

Make it simple.

## How to Use
Add xJS Library to your HTML file
```html


```
or
```html


```

## Examples

## ATTR
```html
github
```

```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
----
[![N|Solid](https://cdn-images-1.medium.com/max/800/1*C87EjxGeMPrkTuVRVWVg4w.png)]