vanilla-query

0.5.0 • Public • Published

Vanilla Query

A syntax-conversion for Vanilla JS & CSS3 methods using traditional jQuery conventions.

Warning: This is NOT a replacement for jQuery. It is still recommended to use jQuery if your app uses plugins and/or makes extensive use of its methods/selectors.

Use this lib if you're relying strictly in Vanilla JS or you are only using jQuery to bind events and use simple selectors, for example in a Backbone.js app.

Scope

This is a strict Vanilla JS or CSS3 syntax conversion. No extra functionality is added - if some function is not available as Vanilla JavaScript or a CSS attribute it will not be created from scratch.

Install

Using npm:

npm install vanilla-query

Usage

Vanilla query will ovewrite the $ namespace, so it is not recommended to be used along side jQuery, Zepto or other libs that may use that global variable.

Having said that, including it as a js dependency in your app should be enough to use the $ methods as accustomed.

A simple example: [ demo ] [ source ]

Methods

These are the currently supported methods:

  • addClass
  • append
  • attr
  • click
  • clone
  • css
  • each
  • empty
  • get
  • getJSON
  • hasClass
  • hide
  • html
  • is
  • next
  • param
  • parent
  • post
  • ready
  • show
  • toggleClass

top of list ↑

Credits

Initiated by Makis Tracend

Started as a weekend project of Makesites Hackathons

Distributed through Makesites.org

Released under the Apatche license v2.0

Package Sidebar

Install

npm i vanilla-query

Weekly Downloads

5

Version

0.5.0

License

APACHE-2.0

Unpacked Size

56.2 kB

Total Files

19

Last publish

Collaborators

  • makesites