Skip to content

html page content extract catelogue by javascript

Notifications You must be signed in to change notification settings

xiekun1992/xCatelogue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xCatelogue

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();

options

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

About

html page content extract catelogue by javascript

Resources

Stars

Watchers

Forks

Packages

No packages published