Skip to main content
Participant
September 7, 2016
Answered

Removing the TOC Expand/Collapse Icon

  • September 7, 2016
  • 1 reply
  • 982 views

Is there anyway to remove the expand collapse icon on the TOC menu as I would like to use my own TOC icon in another location? 

    This topic has been closed for replies.
    Correct answer RodWard

    You could also replace them with a transparent GIF or PNG file.  Then the buttons would be invisible to the user.

    1 reply

    Lilybiri
    Legend
    September 7, 2016

    I mostly use a toggle TOC button as well. My workaround is to replace tje

    default icons by a shape in the background color since there is no way to

    remove them.

    RodWard
    Community Expert
    RodWardCommunity ExpertCorrect answer
    Community Expert
    September 7, 2016

    You could also replace them with a transparent GIF or PNG file.  Then the buttons would be invisible to the user.

    TLCMediaDesign
    Inspiring
    September 7, 2016

    Ahhh of course. Good thinking Rod.

    Thanks.


    I always include a custom css file with my project that hides the buttons.

    .tocExpandCollapse{

    visibility:hidden;

    }

    You can also do it with JavaScript, while hidden, they won't respond to clicks.

    var tocBtns = document.getElementsByClassName( 'tocExpandCollapse' )

    tocBtns[ 0 ].style.visibility = 'hidden';

    tocBtns[ 1 ].style.visibility = 'hidden';