JSS stands for Javascript Style Sheets, it is a jQuery plugin that allows you to take advantage of the full range of jQuery selectors accross all browsers from within your standard CSS files.
You simply include jQuery and JSS in your page and then call the $.jss.apply()
function. All your styles that are between <style>
tags or in externally loaded CSS files are parsed and analysed. Each selector is the piped through to jQuery and the styles are applied via it's .css()
function.
The selectors and properties are limited to those understood by jQuery. JSS has been tested on IE 6+7, Firefox 2, Safari 3, Camino 1.5 & Opera.
There is a speed test which demonstrates some of the functionality available.
A full explaination of the current API is available in the jss.js file.
This should get you started…
$(document).ready(function(){
$.jss.apply();
});
You can download the current version (0.4) here.
This version has several fixes and some cool new features, it is a recommended upgrade for all users.
Remember this still isn't production ready code so please keep sending me your feedback and issues.
Check-out the changelog for more details on what's new.
Speed, speed, speed, if you have any better ideas or fancy helping out then please get in touch, I'd love to hear from you.
:hover
rel="jss-stylesheet"
in link tags