I am building a custom theme based on Magento 1.9 RWD.
How do I manage to hide/close the mini cart and header-account drop down by clicking anywhere outside of those sections ?
EDIT – 1
zhartaunik's answer helped me to resolve the issue. But I am now facing below issue.
If I click the language-switcher its stays open. Now when I click the mini cart and header-account, those drop-downs opens, but also the language-switcher still stays open! I want this one to close directly when another button is clicked? How do I get this done?
Best Answer
Hope It has no issues...
Add this script to
upd.1
My cart is closing successfully with that extension:
Maybe you have some javascript errors in console? As you can see - my javascript is simple. If you click outside of block - it gets closed.