addStyle,_.addStyle

Function Description
Takes two parameters. Adds style to the selected element. Adds style to the UPJSObject.
Function prototype
Takes two parameters. Adds style to the selected element. Adds style to the UPJSObject. If there is a matching style elements it replaces these with the new ones.
Function parameters
@element - dom element
@style - dom style 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 addStyle,_.addStyle function.