Monday 17 October 2016

jquery - The Issue is the click is working for the first time but not after that

$.ajax({
url: "/base_data",
type: 'get',
dataType: 'json',
async: false,
success: function(response) {
$(response).each(function(index, value) {
popup = L.marker([value.latitude, value.longitude]).addTo(map);
popup.on("click", function() {
var con = getMembers(value.id);
// alert("CLicked"+value.id);
// console.log(con);
this.bindPopup(con).openPopup();
});
});
},
error: function() {
}
});

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...