• Resolved awideman

    (@awideman)


    Hi,

    I’ve added my own CSS to make the table sticky to my nav bar when the user scrolls down. I’ve used the plugin settings to make it hidden by default.

    How can I make it so that the table of contents collapses/hides when the user clicks one of the jump links in the list?

    I’ve tried writing JS to watch for clicks on .ez-toc-link and then force the table to collapse:

    #ez-toc-container .eztoc-toggle-hide-by-default {
    display: none !important;
    }

    But it keeps being overridden, I believe by the plugin’s code, to stay open/on display:

    <ul class="ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default" style="display: block;">

    Which means the table of contents stays open after a jump link is clicked and the user has to manually close the featured to continue reading.

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Akshay A

    (@akshaycode1)

    Hi,

    Thank you for reaching out to us.

    The output you’re trying to achieve can be possible by enabling the ‘Click TOC Close on Mobile/Desktop‘ option in the Sticky TOC settings.

    1. Go to Easy TOC setting.
    2. Click on Sticky TOC and enable Click TOC Close on Mobile/Desktop.
    3. Save it and give it try.

    Screenshot.

    Please check and confirm whether it’s working or not.

    Thread Starter awideman

    (@awideman)

    Thanks for pointing that out Akshay. However, to enable that option I have to enable the Sticky TOC, but I am using the Auto Insert TOC with custom CSS styling.

    You can see it here: https://cansumer.ca/public-mobile/

    I’d like to add the Click TOC Close functionality to my own implementation, rather than the approach used by the plugin’s Sticky TOC. Please let me know if this is possible.

    Thanks!

    Plugin Support Akshay A

    (@akshaycode1)

    Hi, We have raised a GitHub ticket regarding this concern, and it will be addressed in the upcoming update. We kindly request your patience in the meantime.

    Here it the GitHub Ticket.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.