Change from (+) symbol to (-) after click (function(){

See the following updated fiddle:

The key is to create a class (I called it .plus) for p.sidebarheading that alters the content of its :after pseudo element to +. Then when anyone clicks on the parent sidebar, that class is toggled on or off, using boilerplate jQuery. (I added a jQuery dependency to your JS because you ought to be using it, as a minimum, for this sort of stuff. It makes your life much easier.)

Leave a Comment