Overflow menu component.
- Source:
Methods
(static) .create(id, contractopt, expandopt)
Creates and registers a overflowMenu, which will contract or expand,
depending on how much space it has.
An overflowMenu can accept two callbacks: one for the contract event and one for the expand event.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string | the unique ID of the overflowMenu element | |
contract |
function |
<optional> |
a callback on contract |
expand |
function |
<optional> |
a callback on expand |
Example
UCASUtilities.overflowMenu.create('my-id', function(){console.log('contract')}, function(){console.log('expand')})
(static) .destroy(id)
Parameters:
Name | Type | Description |
---|---|---|
id |
string | the unique ID of the overflowMenu element |
Example
UCASUtilities.overflowMenu.destroy('my-id')