• Thanks for the great plugin Mike.

    I use your plugin’s widget and a fixed widget plugin to make a sliding table of contents (see here). It works really well.

    If possible, I wondered if you would consider adding a feature which would highlight the last clicked link. this would help users know where they last clicked / where they are in a document. I’m not sure if this is viable or not but though I’d suggest it in case you liked the idea.

    Thanks again

    https://www.ads-software.com/plugins/table-of-contents-plus/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can highlight the target heading using CSS (which is what Wikipedia does too):


    h1 span:target,
    h2 span:target,
    h3 span:target,
    h4 span:target,
    h5 span:target,
    h6 span:target {
    background: #ddeeff;
    }

    Add that to a custom css plugin or your theme’s CSS file and click on a TOC entry to highlight the destination heading. I had thought about including this a while ago but it is very much an appearance thing (so I left it with the theme).

    I also fix the TOC as the page is scrolled too. One most recent project (not live yet) fixes it to the side, but also uses scrollspy to highlight the TOC entry as the page is scrolled. For the same effect, see any Bootstrap doc page and scroll, eg https://getbootstrap.com/javascript/

    Thread Starter ajg-cal

    (@ajg-cal)

    ah ok – thanks!

    People like you are what makes wordpress so great.

    Thread Starter ajg-cal

    (@ajg-cal)

    In case you were interested I managed to implement scrollspy, thanks to your link, over here!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘enhancement: highlight last selected link’ is closed to new replies.