nosUIElement¶
- $.nosUIElement(element[, data])¶
Arguments: - element (JSON) –
JSON definition of the element to create.
type: string. button (default) or link. See $container.nosFormUI() for buttons data, those of links are almost the same. label: string. Element label. action: {}. Action bound to the click event. See $container.nosAction(). bind: {}. Event(s) bound to the element. See $().bind(). disabled: boolean. If true, the element is disabled. menu: {}. If set, binds a context menu to element. menus: [{}]. Array containing each menu line. action: {}. Action bound to the click event of the menu line. See $container.nosAction(). content: string. HTML content of the menu line. label: string. Label of the menu line. icon: Icon name (See icons name of jQuery UI) without the ui-icon- prefix. iconClasses: CSS classes of icon. iconUrl: Icon URL. options: {}. Settings for Wijmo widget wijmenu. - data (JSON) – Data attached to element and passed to action. See $container.nosAction().
Returns: A DOM element detach from DOM.
$.nosUIElement({ type: 'button', label: 'A button' }, { id: 5 foo: 'bar' });
- element (JSON) –
Note
content and label are exclusive. You don’t need both. Same goes for the icon (either use a name, CSS classes or an URL).