• Resolved nagaki

    (@nagaki)


    Hi there,

    First of all, thank you for developing this wonderful plugin.

    I am using custom CSS to switch icons based on the toggle state (open/closed). I rely on the .toc_close class being applied to the #ez-toc-container when the TOC is closed.

    Here is my CSS example:

    .ez-toc-title::after {
    background-image: url("/angle-up.svg");
    }

    #ez-toc-container.toc_close .ez-toc-title::after {
    background-image: url("/angle-down.svg");
    }

    I noticed that while the plugin correctly saves the toggle state in a cookie, the .toc_close class is not applied when the page loads and restores the “closed” state from that cookie.

    Because this class is missing on page load, my custom icon displays incorrectly (it shows the “open” icon when it should show the “closed” icon).

    My Request: Could you please update the plugin so that the .toc_close class is correctly applied to the #ez-toc-container when restoring the “closed” state from the cookie on page load?

    Thank you for your time and assistance.

    • This topic was modified 7 months, 3 weeks ago by nagaki.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Akshay A

    (@akshaycode1)

    Hi,

    Thank you for reaching out to us. Yes, we will take care of it. We have raised a GitHub ticket regarding this concern and it will be addressed in an upcoming update.

    Here is the Ticket.

    Thread Starter nagaki

    (@nagaki)

    Hello, @akshaycode1

    Thank you for creating the issue.

    I’ve created a Pull Request that I believe addresses this problem. I hope this helps.

    If you have time, I would appreciate it if you could take a look. Please feel free to merge it if you think it’s appropriate.

    Here is the PR: https://github.com/ahmedkaludi/easy-table-of-contents/pull/919

    Thank you for your consideration!

    Plugin Support Akshay A

    (@akshaycode1)

    Yes, our developers will look into it. Once we release an update, we will inform you here. Have a great day ahead!

    Thread Starter nagaki

    (@nagaki)

    Thank you so much! I look forward to the update. You have a great day too!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘.toc_close class not applied when restoring toggle state from cookie’ is closed to new replies.