_.tag

Function Description
Tag has one or two input parameters.For one parameter, it returns elements with the given tag from document.body. For two parameters, it returns elements with the given tag from second parameter.
Function prototype
_.tag(tag, context). If @context defined, it returns elements with @tag from @context else document.body.
Function parameters
@tag - dom tag 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 _.tag function.