new BookmarkSpy(id, properties) → {Object}
Parameters:
| Name |
Type |
Description |
id |
String
|
The id of the component. |
properties |
Object
|
HTMLElement
|
The properties used to initialize the component or the container element. |
- Mixes In:
Returns:
An instance of the component.
-
Type
-
Object
Extends
Classes
- BookmarkSpyEvents
Members
anchorContainer
Gets or sets the anchor container element or element id.
Properties:
| Name |
Type |
Attributes |
Default |
Description |
anchorContainer |
HTMLElement
|
String
|
<optional>
|
document
|
|
cssClass
Gets or sets the css class to apply to the active menu-item anchor.
Properties:
| Name |
Type |
Default |
Description |
cssClass |
String
|
selected
|
|
cssClassParent
Gets or sets the css class to apply to the parent anchor(s) of the active menu-item anchor.
Properties:
| Name |
Type |
Attributes |
Description |
cssClassParent |
String
|
<optional>
|
|
Type:
fireAnchorClick
Gets or sets a value indicating if the click event of the selected anchor is executed.
Properties:
| Name |
Type |
Attributes |
Default |
Description |
fireAnchorClick |
Boolean
|
<optional>
|
false
|
|
horizontal
Gets or sets a value indicating to spy on horizontal instead of vertical scrolling.
Properties:
| Name |
Type |
Attributes |
Default |
Description |
horizontal |
Boolean
|
<optional>
|
false
|
|
Gets or sets the menu component which holds the bookmark links.
Properties:
| Name |
Type |
Attributes |
Description |
menuId |
String
|
<optional>
|
|
offset
Gets or sets the offset in pixels.
Properties:
| Name |
Type |
Attributes |
Default |
Description |
offset |
Number
|
<optional>
|
0
|
|
Gets or sets the scrollable container element or element id.
Properties:
| Name |
Type |
Attributes |
Default |
Description |
scroller |
HTMLElement
|
String
|
<optional>
|
document
|
|
Gets or sets the bookmark tags (space delimited) to spy on.
Properties:
| Name |
Type |
Attributes |
Description |
tags |
String
|
<optional>
|
|
updateURL
Gets or sets a value indicating if the URL anchor must be rewritten to the active bookmark.
Properties:
| Name |
Type |
Attributes |
Default |
Description |
updateURL |
Boolean
|
<optional>
|
true
|
|
Methods
destroy()
- See:
-
init()
Initializes the BookmarkSpy component.
render()
Initializes the BookmarkSpy component. Both init and render are the same for this component.
show()
Initializes the BookmarkSpy component if this has not yet been done.
suppressNextChangeEvent(action)
Suppresses any change events fired by the underlying input element during the execution of the provided action. Use this when programmatically setting a component value to prevent the change event from propagating as a user interaction.
The suppression is automatically lifted after the action completes, even if it throws.
Parameters:
| Name |
Type |
Description |
action |
function
|
The action to execute with change events suppressed. |
- Mixes In:
Type Definitions
ChangeEventArgs
BookmarkSpy change event arguments.
Type:
Properties:
| Name |
Type |
Attributes |
Description |
selected |
HTMLAnchorElement
|
|
The anchor of the active bookmark. |
deselected |
HTMLAnchorElement
|
null
|
<optional>
|
The anchor of the previously active bookmark, empty on the first change. |