exports

exports

Wrap the last X words in an HTML tag to prevent them from wrapping (i.e. orphans)

Constructor

new exports(el, opts)

Source:
Parameters:
Name Type Description
el HTMLElement Target DOM node
opts Object Options
Name Type Attributes Default Description
wordCount number <optional>
2 Minimum number of words required to wrap to a new line
wrapEl string <optional>
span Tag name to use for the wrapper element
inlineStyles boolean <optional>
true Add “white-space: nowrap;” to elements as inline style
className string <optional>
u-nowrap Class name to apply to wrapper element
append string <optional>
Any arbitrary string or HTML to append inside of the wrapper element