Leaflet: how can I update content of popup by jQuery

المشرف العام

Administrator
طاقم الإدارة
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?



أكثر...
 
أعلى