CSS jQuery Swap Images

I have a link on a menu that shows / hides menu choices.  The <li>Contains the Words View All.  I would like to change that so there is an image of a Plus sign.  When it is clicked the image changes to a Minus sign.
I am not sure how to write the jQuery and the CSS.
LVL 7
rgranlundAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
The CSS (assumes Bootstrap)
<style type="text/css">
ul {
  background: #252525;
}
ul li a {
  background: #252525;
  color: #999;
}
</style>

Open in new window

The HTML
       <ul class="nav">
        <li><a href="#" class="expander"><span class="glyphicon glyphicon-plus"></span> Click me to expand my menu</a>
          <ul style="display: none" class="nav">
            <li><a href="#">Option 1</a></li>
            <li><a href="#">Option 2</a></li>
            <li><a href="#">Option 3</a></li>
          </ul>
        </li>
      </ul>

Open in new window

The jQuery
$(function() {
  $('.expander').click(function(e) {
  e.preventDefault();
  $(this).next().toggle();
  $(this).find('span').toggleClass('glyphicon-plus glyphicon-minus');
  });
});

Open in new window

The working sample
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.