I have created a map that has the points(.field-name-field-pin-point) for specific locations, and when the points are clicked, they open up a box with more information about it. The problem is that the points are small so it is annoying to click on them again to turn the boxes off. I just want to alter so that when the user clicks outside of ".group-dealer", the toggleClass(hidden) will be activated.
This is the code that I am using currently that works perfectly for using .field-name-field-pin-point as the on/off toggle:
jQuery('.node-201 .field-name-field-pin-point').click(function() {
jQuery(this).siblings('.group-dealer').toggleClass('hidden');/* use toggleClass if more appropriate*/
});
Here is the basic HTML layout:
<div class="node-201">
<div class="group-dealer">...</div>
<div class="field-name-field-pin-point">...</div>
</div>