processBackground
[ Function ]
public static processBackground(
element: JQuery | HTMLElement[] | NodeListOf<HTMLElement> | HTMLCollectionOf<HTMLElement> | HTMLElement | undefined,
valueNew: TcHmi.Background | null
): void;
Sets multiple background properties for one or more HTML elements.
Parameter
Name | Type | Description |
---|---|---|
element Info: Type HTMLElement supported from version 1.10 | JQuery, HTMLElement[], NodeListOf<HTMLElement>, HTMLCollectionOf<HTMLElement>, HTMLElement, undefined |
|
valueNew | Complex object for the background color and the background image. |
Return value
Type | Description |
---|---|
void | No return value |
Available from 1.8 |
Sample - JavaScript
var newElem = $('<div class="testdiv"></div>');
TcHmi.StyleProvider.processBackground(newElem,
{
color: {color: 'red'},
image: null,
imageWidth: null,
imageWidthUnit: 'px',
imageHeight: null,
imageHeightUnit: 'px',
imageHorizontalAlignment: 'Center',
imageVerticalAlignment: 'Center',
imagePadding: null
}
);