CollapsibleText
CollapsibleText is a text element for managing large amounts of text. Learn more.
Additional information about this section
Store values associated with an object
- ellipsisEnabled
Indicates whether the ellipsis functionality is turned on.
- maxLines
Sets or gets the maximum number of lines of introductory text in the collapsible text.
- readMoreActionData
Sets or gets the data object of the read more action for the collapsible text.
- readMoreActionType
Sets or gets the type of read more action for the collapsible text.
- text
Sets or gets the plain-text content of a collapsible text element.
- customClassList
A property that represents an element's custom CSS classes.
- deleted
Indicates if an element was temporarily deleted from the DOM. Use the restore function to restore the deleted element.
- rendered
Indicates if an element is currently in the DOM structure.
- global
Indicates if an element appears on all pages or only on the current page.
- id
Gets the element's ID.
- parent
Gets the element's parent element.
- type
Gets the element's type.
- hidden
Indicates if the element is visible or hidden.
- isVisible
Indicates if the element is actually visible.
- collapsed
Indicates if the element is collapsed or expanded.
Perform actions on an object
- addReadMoreButton( )
Adds a read more button that links to the remaining text when clicked.
- collapseText( )
Collapses the collapsible text and displays the introductory text with an ellipsis.
- disableEllipsis( )
Turns off the ellipsis functionality.
- enableEllipsis( )
Turns on the ellipsis functionality.
- expandText( )
Expands the collapsible text, displays the full text, and hides the ellipsis.
- removeReadMoreButton( )
Removes the read more button that links to the remaining text when clicked.
- delete( )
Deletes an element from the DOM. This is a temporary deletion. Use restore to restore the deleted element. SEO crawlers cannot find content in an element whose ...
- onMouseIn( )
Adds an event handler that runs when the pointer is moved onto the element. You can also define an event handler using the Properties and Events panel.
- onMouseOut( )
Adds an event handler that runs when the pointer is moved off of the element. You can also define an event handler using the Properties and Events panel.
- restore( )
Restores a deleted element to the DOM.
- scrollTo( )
Scrolls the page to the top of the element using an animation.
- onViewportEnter( )
Adds an event handler that runs when an element is displayed in the viewable part of the current window.
- onViewportLeave( )
Adds an event handler that runs when an element is no longer displayed in the viewable part of the current window.
- hide( )
Hides the element and sets its hidden property to true, using an effect if specified.
- show( )
Shows the element and sets its hidden property to false, using an effect if specified.
- collapse( )
Collapses the element and sets its collapsed property to true.
- expand( )
Expands the element and sets its collapsed property to false.
- onClick( )
Adds an event handler that runs when the element is clicked.
- onDblClick( )
Adds an event handler that runs when the element is double-clicked.