public
Description: Prototype like open source Javascript libary for Facebook applications.
Homepage:
Clone URL: git://github.com/gdeglin/inigral-fbjs-library.git
name age message
file COPYING Tue Oct 21 16:14:37 -0700 2008 Add license [gdeglin]
file README Tue Oct 21 16:01:59 -0700 2008 Add js file [gdeglin]
file fbjs_lib.js Tue Dec 02 12:55:59 -0800 2008 Improve getElementsByClass support. Patch from ... [gdeglin]
README
Usage examples:

Select Element
$('noelement');

Select 2 Elements
$('test1','test2');

Select elements by class
getElementsByClass('test2c')

Select elements by tag
getElementsByTagName('strike')

Use Javascript version of .map
['a2','b2'].toSource() == map(['a','b'], function(val) { return val+2 }).toSource()

Recurse through the dom under a selected element and return nodes for which test is true as an array
collect($('test1'), function(element){ return (element.getClassName() == 'test2c') })

Check if an element is visible
$('test1').visible()

Hide an element
$('test1').hide()

Show an element
$('test1').show()

Toggle element visibility
$('test1').toggle();

Remove an element from the dom
$('test1').remove();

Get a hash of calculated element dimensions width/height as integers
$('test1').getDimensions()

Update remote
Update: function(target_element, response_type, action_path, callbacks, post_parameters)
(FBML/RAW)  
Ajax.Update('test1', 'FBML', 'http://...',{ success: function(){} })

Load Remote
Load: function(response_type, action_path, callbacks, post_parameters)
(FBML/RAW/JSON)  
Ajax.Load('JSON','http://...',{ success: function(result){console.log(result)} }, {'json':test_content})