Minimal Dom Manipulation Library
window.EmpatiJS
window._
- $ ( Node )
_.$(selector)
_.$('div')
- $$ ( NodeList )
_.$$(selector)
_.$$('div')
- Ajax (Promise)
_.Ajax(url) // Get
_.Ajax('https://httpbin.org/get');
_.Ajax(url, object) // post
_.Ajax('https://httpbin.org/post', {name: 'test',id: 0})
- Elements ( Array )
_.Elements(selector)
_.Elements('div')
- Events ( undefined )
_.Events(selector, eventname, function)
_.Events('#button', 'click', function(){ alert('clicked to #button') })
- Event ( undefined )
_.Event[elementid][eventname] = function
_.Event.elementid.eventname = function
_.Event.button.click = function(){ alert('clicked to #button') }
- Text ( string )
_.Text(selector)
_.Text('p')
_.Text(selector) = string
_.Text('p') = "Test"