YASS

YASS: Yet Another cSS selector

The fastest CSS selectors JavaScript implementation in the world!

Documentation

YASS is a lightweight CSS selectors library that supports some of the common combinations of CSS3 specification

_ or yass function params

Main selectors function receives 3 params: CSS selector itself, selection root (document by default) and noCache to clean up cache for given selector (the cache will be automatically dropped for modern browsers, but in IE you should set this parameter to select new set of nodes after changes in HTML).

More examples are listed in tutorials section.

Supported Selectors:

Any legal combination of these selectors will work with _(), including compound selectors ("," delimited). Returned value is either a DOM element or an array of such elements. If there is no element for given selector YASS will return null.

Unsupported Selectors:

Some of the selectors are not supported yet. Maybe they will be handled by the next versions of YASS.

Modules API

YASS is very flexible for any kind of extensions. For example you can dynamically load full Prototype of full jQuery after load of YASS core. For this purpose you should write:

<script src="yass.js" type="text/javascript" class="yass-module-jquery"></script>

With this piece of code you:

  1. Load YASS as external JavaScript file
  2. Load file yass.jquery.js that is located near initial HTML file - on DOM ready event

You can also load any other file as a YASS module. Just use:

<script src="yass.js" type="text/javascript" class="yass-module-http://yass.webo.in/airee_ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

On the end of each module you can:

More examples can we studied from online modules load demo.