So my site uses the Google Maps API to display a map of the company hosting the deal once the user clicks to view the deal itself. If the map function returns true I user $('#map').show()
to display it.
I know I can use the .hide() when the user clicks another button on the page to hide the div, but I have about 7 buttons on the page that do different things and using $('#map').hide()
in each one is doable but seems repetitive and ugly coding wise.
Does anyone have any suggestions as to hide the div when a user clicks on any other button besides the 'view deal' button, maybe some form of .each()
?
hideMap
? – Šime Vidas Dec 11 '11 at 21:25