1.0.6 • Published 4 years ago

@nenuse/tquery v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

tQuery

Tiny version of jQuery reduced to basic functionality

DOM Manipulation

Select DOM

var elems = $('div');

DOM Methods

  • .on(event, callback)
  • .off(event)
  • .val([value])
  • .attr([attribute])
  • .delAttr(attribute)
  • .append(html)
  • .prepend(html)
  • .del()
  • .hasClass(class)
  • .addClass(class)
  • .delClass(class)
  • .html([html])
  • .parent()
  • .find(selector)
  • .blur()
  • .css(json)

Procedural Methods

Available through the _ variable.

  • _.json(url, [json], callback) sends a POST request to url with an optional JSON body, then fires the callback function with 1 argument containing the response
  • _.file(url, file, callback) sends a POST request to a url containing a user selected file, callback as previous one
  • _.script(url) loads into the document the .js file located in url
  • _.css(url) loads into the document the .css file located in url
1.0.6

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago