_,up

Function Description
Main function of UPJS. It can have several types of input described as follows:
UPJS Query
For one parameter, it executes given UPJS query for document.body. For two parameters, it executes given UPJS query for the second parameter.
Dom Element
It returns an UPJSObject with the given Dom Element.
Array
It returns an UPJSObject with the given Array.
JSON Object
It returns an UPJSObject with the given JSON Object.
Function prototype
_(selector, context). If @context defined, it executes selector for @context else document.body.
_(domElement). Creates UPJSObject with @domElement and returns it.
_(jsonObject). Creates UPJSObject with @jsonObject and returns it.
_(array). Creates UPJSObject with @array and returns it.
Function parameters
@context - dom element
@selector - UPJS selector query
@domElement - dom element
@jsonObject - JSON/JavaScript object
@array - JavaScript Array
Sample HTML DIV element is given to try UPJS function.
Orange DIV
Apple DIV
  • apple 1
  • apple 2
Code area to try out _,up function.