R
R
rennameduser_34322021-06-08 00:20:53
JavaScript
rennameduser_3432, 2021-06-08 00:20:53

How can I hide a block even if a certain button is not pressed?

$('#showIntervalDropdown').on('click', function(e){
            e.preventDefault();

            $('#intervalDropdown').toggle();
        });


now when you click on this button, it shows / hides the block, I need to make it so that when you click anywhere, the block is hidden

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Alexey Yarkov, 2021-06-08
@yarkov

Well, hang a click handler on the entire document

W
webscout, 2011-03-15
@webscout

I think that in this case the best option is to take some universal framework (YII or Kohana, for example) and manually write this functionality using Yandex Maps API, Google Maps API.
Making it possible to mark points on the map / display them using the maps API is a one-night stand.

Z
zyalt, 2011-03-16
@zyalt

you can see shahidi.com/

C
ChemAli, 2011-03-16
@ChemAli

If it's just dots, then a clumsy variant for a quick start:
Drupal + gmap + location (an example can be found in one of these books about Drupal with site recipes)
Drupal + yandex_map

A
Anatoly, 2011-03-15
@taliban

Something tells me that Google maps api has it all, although I don’t know for sure.

S
shurshur, 2011-03-15
@shurshur

You can open the openstreetmap engine itself and raise it with your base. True, it will be firing a cannon at mosquitoes - too complicated and cumbersome.
It's much easier to take OpenLayers and use it to add labels on click. An example of this kind of solution is the OpenStreetBugs service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question