setSimpleElementStyle
[ Function ]
public static setSimpleElementStyle(
element: Jquery<Element> | readonly Element[] | NodeListOf<Element> | HTMLCollectionOf<Element> | Element | undefined,
property: string,
values: string[] | null
): void;
Sets multiple values for one or more HTML or SVG elements on a CSS property. In rare cases, several CSS values for the same property may be required for vendor prefixes. The last value known to this browser remains active.
Parameter
Name | Type | Description |
---|---|---|
element Info: Type Element supported from version 1.10 | JQuery<Element>, readonly Element[], NodeListOf<Element>, HTMLCollectionOf<Element>, Element, undefined |
|
property | Name of the CSS property | |
values | string[] | Desired new values of the CSS property. The value null (not the string "null") deletes the current value. |
Return value
Type | Description |
---|---|
void | No return value |
Available from version 1.10 |
Sample - JavaScript
var control = TcHmi.Controls.get('TcHmiButton');
if(control === undefined){
return;
}
var cntrlElem = control.getElement();
TcHmi.StyleProvider.setSimpleElementStyle(
cntrlElem,
'display',
['-ms-flexbox', '-webkit-flex', 'flex']
);