html page content extract catelogue by javascript
var catelogueObj = new xCatelogue({ contentContainer: '#content', catelogueContainer: '#catelogue' }); catelogueObj.bootstrap();
or
var catelogue = document.querySelector('#catelogue'); var catelogueObj = new xCatelogue({ contentContainer: '#content' }); catelogue.innerHTML += catelogue.generateCatelogue(); catelogueObj.bootstrap();
contentContainer
string, html element selector, this element wrapped contents
catelogueContainer
stirng, html element selector, this element used to maintain catelogue
showBackToTop
boolean, if a back to top link append to catelogue element
customTitleAttr
string, a element attribute name, used to identify the custom title
customTitles
string, the value of the customTitleAttr
, like: h1, h2, h3, h4, h5, h6