USO Javascript Library

By Tim Smart Last update Jun 22, 2009 — Installed 26 times. Daily Installs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Script Summary:
Tiny Javascript library for Userscripts that supports jQuery like functions.
Version: 1.1.4
Copyright: Tim Smart
License: GPL GNU version 3.0 or later

This script has no discussions.

start the discussion

This script has no reviews.

A minified version is in the source.

Usage information is in the source code. This script is intended for developers only.

1.1.2 Update

Small bug fixes and Regex changes

1.1.0 Update

Now comes with a animation plugin!
Fade in all selected divs over 1 second
$( "div.fadein" ).show( 1000 );

Fade out all selected divs over 1 second
$( "div.fadein" ).hide( 1000 );

Does the same as above
$( "div.fadein" ).animate( {opacity:"1"} );

It has a queuing system, so you can string animation's together
$( "div.fadein" ).animate( {opacity:"1"} ).animate( {fontSize:"20px"} );

Has three arguments: The CSS object, which only supports numeric properties such as fontSize and borderWidth. Second argument is how long you want the animation to last. Third argument is the callback function after animation is finished
$( "div.fadein" ).animate( {opacity:"0.5"}, 5000, function(){} );

You can call stop() on some elements to stop a animation in it's tracks.
$( "div.fadein" ).stop();

Enjoy!