Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

some simple modules that do dom handling etc...

Resources

License

You can’t perform that action at this time.