Summary command
Create a summery, linked or not, of a content area
Basic Usage (HTML)
data-jkit="[summary:what=h4;from=#testcontent]"
Advanced Init (JavaScript)
$('#myelement').jKit('summary', { 'what': 'h4', 'from': '#testcontent' });
Options
Option | Values | Default | Description |
---|---|---|---|
what | DOM element | Which element contains the content part summary (normally a header) | |
linked | “yes” or “no” | yes | Do you want to link to an anchor from the summary? (anchors are created automatically if not already available) |
from | jQuery selector | From which content area to create the summary | |
scope | “children” or “all” | children | Only select the direct childrens of the element or from all? |
style | “ul” or “select” | ul | Create an unordered list or a select summary? |
indent | “yes” or “no” | no | If the option “what” is set to “headers”, we can indent the smaller headers in our summary |
Events
Examples
Basic example:
Create a summary from the “h4” elements inside a content area:
Test headline 1
Test headline 2
Test sub headline 1
Test headline 3
Test headline 4
Source:
<div data-jkit="[summary:what=h4;linked=yes;from=#testcontent]"></div> <div id="testcontent"> <h4>Test headline 1</h4> <p data-jkit="[lorem:paragraphs=2]"></p> <h4>Test headline 2</h4> <p data-jkit="[lorem:paragraphs=1]"></p> <div> <h4>Test sub headline 1</h4> <p data-jkit="[lorem:paragraphs=2]"></p> </div> <h4>Test headline 3</h4> <p data-jkit="[lorem:paragraphs=3]"></p> <h4>Test headline 4</h4> <p data-jkit="[lorem:paragraphs=2]"></p> </div>
Replacements
There are currently no replacements for this command.
[ Learn more about replacements ]
Discussions
Do you have questions or do you want to suggest new features? Than head over to our new community:
[ jKit Community ]