Function Description
Takes three parameters. Sets the selected element attribute to the value given. Sets UPJSObject attribute to the value given.
Function prototype
_.setAttr(element,attrName,attrValue). Sets the @attrName to @attrValue of @element. Sets the @attrName to @attrValue of UPJSObject.
Function parameters
@element - dom element
@name - dom attribute name
@value - dom attribute value
Sample HTML DIV element is given to try UPJS function.
Orange DIV
Apple DIV
  • apple 1
  • apple 2
Code area to try out setAttr,_.setAttr function.