some simple modules that do dom handling etc...
JavaScript CSS
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
src
test
.gitignore
.travis.yml
LICENSE
README.md
gulpfile.js
package.json

README.md

simple modules

Build Status

simple dom/event/ajax/selector syntactic sugar and basic ui framework(ie9+ or maybe no ie).

the target is creating very small($.js only 1.2k compressed and not gzipped) and basic modules to be used in webpack/global. for simple pages, load the script/css into html to reduce http requests.

  • selector( $(selector) )
  • event
    Node.on(type, callback)
    Node.off(type, callback)
  • ajax
    //all return Promise(xhr)
    $.ajax(options)
    /*
    {
        url: String
        ,data: Object
    }
    */
    $.get(url)
    $.post(url, data)
  • classHandling
$(selector).addClass
$(selector).removeClass
$(selector).hasClass

test

git clone https://github.com/zxdong262/simple-modules.git
cd simple-modules
npm install
npm run dev