Skip to content

This is a plugin that speeds up work with some code. He is very similar to jQuery

License

Notifications You must be signed in to change notification settings

TheWitcher1991/gross-js

Repository files navigation

GROSS-JS

This is a plugin that speeds up work with some code. He is very similar to jQuery

All documentation is on this site - ...

Including

Clone the repository in a suitable folder

$ git clone https://github.com/TheWitcher1991/gross-js.git

Then download the nodejs packages And assemble the project

$ npm install
$ npm run build

The desired file in the build folder

{PATH}/build/gross.js

Webpack/ES6/ES5

You can use ES6 ES5 connection modules

ES6

import g from 'gross-js';
// or 
import { Gross } from 'gross-js';

ES5

const g = require('gross-js');
// or
const { Gross } = require('gross-js');

Then using wepback or other collectors to get the source file

Example

'use strict';

// We wait until the page loads and execute the code inside
g(function () {

    // By clicking on an element we execute an event
    g('#id').handler('click', () => {
            alert(3);
    });

    // Add class to element
    g('.class').addClass('TestAddClass');

    // Add attribute to element.
    g('.class').attr('style', 'background:blue;color:#fff;text-align:center');

   // Search for an item in a container
    g('#id').find('.class');

});

Node

To include Gross-js in Node, first install with npm.

$ npm i gross-js

then

<script src="./node_modules/gross-js/bin/gross-js.js"></script>

If you don't wish to clone, you can download the source code.

About

This is a plugin that speeds up work with some code. He is very similar to jQuery

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published