gfranko / jquery.tocify.js

A jQuery Table of Contents plugin that can be themed with Twitter Bootstrap or jQueryUI.
http://gregfranko.com/jquery.tocify.js/
MIT License
928 stars 216 forks source link

mixed headings #110

Open robertnicjoo opened 5 years ago

robertnicjoo commented 5 years ago

Hi, I'm just trying this and I have issue with detecting headings in my panel. It gets headings provided by my editors in tocify list as well.

my question is

How to avoid getting my editor headings in my sections list?

54

Code

<script>
    $(function() {
        var toc = $("#tocify").tocify({context: ".tocify-content", showEffect: "fadeIn",extendPage:false,selectors: "h5, h6" });
    });
</script>

Thanks.

jenlampton commented 5 years ago

Have you tried adding classes to the headings that are not from editors and then also making the selectors in tocify more specific? Something like selectors: "h5.section, h6.section"?