_.id

Function Description
Id has one or two input parameters.For one parameter, it returns element with the given id from document.body. For two parameters, it returns element with the given id from second parameter.
Function prototype
_.id(id, context). If @context defined, it returns element with @id from @context else document.body.
Function parameters
@id - dom id attribute value
@context - context that is applied, it is an html element
Sample HTML DIV element is given to try UPJS function.
Orange DIV
Apple DIV
  • apple 1
  • apple 2
Code area to try out _.id function.