Change how responsive hiding classes are added to table of contents elements.
This replaces a couple className
concatenations with classList.add
calls so the hidden-md
and hidden-lg
classes will only be added to table of contents elements when they are not already there.