Oxygen's Table Of Contents composite element scans for and lists all the h2, h3, h4, h5 and h6 headings in the TOC on the page out of the box.

If you are looking to exclude certain headings from it, we can use the jQuery not() method like this.

In the TOC Code code block edit the JavaScript and change

jQuery('h2,h3,h4,h5,h6').each( function() {

to

jQuery('h2,h3,h4,h5,h6').not('#headline-1096-44, #headline-1100-44').each( function() {

where #headline-1096-44 and #headline-1100-44 are the selectors of headings that should not be included.

If you have a number of headings on a page that you want to exclude from Oxygen's Table Of Contents, you could assign a class of say, not-in-toc to each of them and change the line to

jQuery('h2,h3,h4,h5,h6').not('.not-in-toc').each( function() {

Reference

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

You need to be logged in to view and post comments.
Not a member yet? Join here.
magnifiercross
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: