Skip to content

zxdong262/simple-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Packages

No packages published