My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
examples  
Updated Oct 13, 2007 by sairi.na...@gmail.com
$alert( (-4).$abs().$sqrt().$pow(3) ); // 8
$alert( [ 1, '2', [ 3, 4, true, false, '5a' ] ].$combine( $number.$summ, [ 1, 2, 3 ] ) );
// [ 2, 4, [ 6, 7, 4, 3, NaN ] ]
// means: [ 1+1, 2+2, [ 3+3, 4+3, 1+3, 0+3, '5a'+3 ] ]
var foo= {
	bar: function( a, b, c ){
		$alert( [ this, a, b, c ] ); // [ { bar }, 1, 2, 3 ]
	}
}

foo.bar.$bind( foo, [1,2,3] ).$timeout( 1000 ); // call function with 1000ms delay
var foo= { bar: 123 };

foo.$observe( 'myevent', function( ev ){
	$alert( [].$append( arguments ) ); // [ { a, b, $nodefault, $stop, $target, $key } ]
})

$alert( foo ); // { bar, onmyevent }

foo.onmyevent( { a: 1, b: 2 } );
document.$observe( 'domready', function( ){ // after load html
    $alert( $doc ); // outputs outerHTML of document
    $alert( $body.$value() ); // outputs innerHTML of body
})
$alert( $date().$format( '%u %d-%m-%y | %h:%M:%s | $u $d-$m-$y | $h:$M:$s.$l | %%L $$L | $L' ) );
// 03 10-09-07 | 00:44:33 | 3 10-9-2007 | 0:44:33.468 | %L $L | 10 Октябрь 2007 г.
document.$observe( 'mouseup', function( ){ // on every mouseup
	var r1= $( 'foo' ).$range(); // create range for element
	var r2= $selection().$range(); // create range for selection
	$alert( r2.$contains( r1 ) ); // true if element completely selected
	$alert( r2.$concerns( r1 ) ); // true if element partial selected
	$alert( r2 ); // output selected html-fragment source
})
Powered by Google Project Hosting