Constructor
new SidebarElement(target, events)
Parameters:
Name | Type | Description |
---|---|---|
target |
string/HTMLElement | id or HTMLElement (optional) |
events |
Object | events for the EventObject (optional) |
- Source:
Methods
addTool(icon, onClick, tooltip, toggleMode, customElement)
add a tool to the header as html or string.
If a customElement is defined, the other arguments have no effect
Parameters:
Name | Type | Description |
---|---|---|
icon |
string | icon css classes |
onClick |
string | callback function for click event. boolean payload defines enabled-state |
tooltip |
string | (optional) tooltip when hovering the mouse |
toggleMode |
boolean | switching between two states on each click |
customElement |
HTMLElement | (optional) custom element |
- Source:
collapse()
collapse the content of the element
- Source:
disable()
disable pointer events and make content transparent
- Source:
enable()
enable pointer events and remove transparency of the content
- Source:
expand()
expand the content of the element
- Source:
getContentContainer()
return the content DOM-element
- Source:
setContent()
set the content of the element
- Source:
setNotificationCount(cnt)
Set value for the notification bubble in the elements header
Parameters:
Name | Type | Description |
---|---|---|
cnt |
number |
- Source:
setTitle()
change the title displayed in the
header of the element
- Source: