this is the content of div "foo"
this is the content of div "foo2"

   

accepts element id

myLibrary('foo')

accepts objects

myObject = document.getElementById('myElement'); myLibrary( myObject )

accepts arrays of id's

idArray = [ 'foo' , 'foo2' ]; myLibrary( idArray )

accepts mixed arrays

myObject = document.getElementById('myElement'); idArray = [ 'foo' , 'foo2' , myObject ]; myLibrary( idArray );

accepts multiple arguments as id's

myLibrary( 'foo' , 'foo2' )

accepts multiple arguments as objects

myObject = document.getElementById('myElement'); myLibrary( myObject );

accepts mixed arguments

myObject = document.getElementById('myElement'); myLibrary( 'foo' , 'foo2' , myObject )

Not supported

If multiple arrays are provided as arguments only the first one is used. Arrays with arrays dont work.