Quantcast
Channel: Question and Answer » leaflet
Viewing all articles
Browse latest Browse all 198

Leaflet: how can I update content of popup by jQuery

$
0
0

in my popup is a spinner with class=spinner and an empty container for addon informations.

  1. I want to hide after successful ajax.
  2. I want to add some html in a container.

I tried this:

~~~


    map.on('popupopen', function(e) {
        var marker = e.popup._source;
        $.getJSON(url,function(data) {
        $(e.popup).find('.spinner').hide();
        $(e.popup).find('container').html('same stuff')    

});
~~~

It doesn’t work. Any ideas?


Viewing all articles
Browse latest Browse all 198

Trending Articles