GithubHelp home page GithubHelp logo

thewitcher1991 / gross-js Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 59 KB

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

License: GNU General Public License v3.0

JavaScript 96.14% Hack 3.86%

gross-js's Introduction

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.

gross-js's People

Contributors

thewitcher1991 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.