Trouble with click event

Trouble with click event

Hi there,

I'm relatively new to jQuery and I'm struggling to understand a problem I have with my event bindings.

I've created a toggle to show/hide the inner info of a three divs. The functionality was ok if none of the sort buttons at the top had been clicked.

If however, any of the top buttons were pressed, the toggle no longer worked. 

To try to get around the problem I've put my function inside another event, but don't know how to remove the original without errors.

To try to demonstrate I've created a fiddle which can be found here:

Here too is the code in question:

  1. $(document).on('click', '.info', function(){
  2. $('.switcher').click(function(event)
  3. {
  4. event.preventDefault();
  5. console.log("Switcher clicked");
  6. $(this).toggleClass('open');
  7. $(this).parent().find(".info-inner").slideToggle("slow");
  8. });
  9. });

Apologies for any confusion!