@rushstart/core

1.0.3 • Public • Published

Get it

$ npm i @rushstart/core

Use it

Add a <script> element for rushstart.js

<script src="path/to/rushstart/dist/rushstart.min.js"></script>

Or include it like webpack module

import $ from '@rushstart/core'
var $ = require("@rushstart/core")

And write very fast code:

/**
* Append a wrapper
*/
$('<div id="wrapper"></div>').forEach(element => document.body.append(element));

/**
* Attach an event handler to a child element that has not yet been created
*/
$('#wrapper').on("click", function() {
    console.log("clicked on", this);
}, '.clicker');

/**
* Append the child element
*/
$('<a class="clicker"></a>').forEach(element => document.wrapper.append(element));

Package Sidebar

Install

npm i @rushstart/core

Weekly Downloads

5

Version

1.0.3

License

ISC

Unpacked Size

20.1 kB

Total Files

11

Last publish

Collaborators

  • rushstart