Hide #shoppingBag if you click outside of it but the toggle function should still work.
Thanks for any help.
This is my code:
   $(document).ready(function () {
        $('.button-cart').click(function(){
          $('#shoppingBag').toggle();
        });
    }); 
HTML
<span class="button-cart">Warenkorb</span>
<div id="shoppingBag"></div>
