getStyle,_.getStyle

Function Description
Takes one or two parameters. For one parameter, it returns the given alement's style value. For two parameters, it returns given element's style property by its property name.
Function prototype
_.getStyle(element,name). If @name is defined, it returns the style attribute property value by property @name, else it returns style of @element or UPJSObject.
Function parameters
@element - dom element
@name - dom style attribute property name
Sample HTML DIV element is given to try UPJS function.
Orange DIV
Apple DIV
  • apple 1
  • apple 2
Code area to try out getStyle,_.getStyle function.