Answer the question
In order to leave comments, you need to log in
Why doesn't DOMSubtreeModified work correctly in firefox??
Good day, I have a code
$(mSearch2.options.results).on("DOMSubtreeModified", function() {
//* перезагрузка результатов
myMap.geoObjects.remove(clusterer);
var new_object = ymaps.geoQuery([]);
var massive_coord = $(".coords");
massive_coord.each(function(i){
new_object = new_object.add(ymaps.geoQuery(ymaps.geocode($(this).text(),{results: 1}))
.setProperties({
balloonContentHeader:$(this).data('title'),
balloonContentBody: $(this).data('description')
})
);
new_object.setOptions({
iconLayout: 'default#image',
iconImageHref: 'main/red_marker.png',
iconImageSize: [20, 35],
iconImageOffset: [-3, -42]
})
var clus = new_object.clusterize();
myMap.geoObjects.add(clus);
});
});
Answer the question
In order to leave comments, you need to log in
To begin with, learn how to insert the code normally, so that your eyes do not climb on your forehead. Regarding the DOMSubtreeModified event - although it is deprecated, it still works fine in the latest version of FF
$(mSearch2.options.results).on("DOMSubtreeModified", function() {
//* перезагрузка результатов
var new_object = ymaps.geoQuery([]);
var massive_coord = $(".coords");
myMap.geoObjects.remove(clusterer);
massive_coord.each(function(i) {
new_object = new_object
.add(
ymaps.geoQuery(
ymaps.geocode($(this).text(), { results: 1}))
.setProperties({
balloonContentHeader:$(this).data('title'),
balloonContentBody: $(this).data('description')
});
);
new_object.setOptions({
iconLayout: 'default#image',
iconImageHref: 'main/red_marker.png',
iconImageSize: [20, 35],
iconImageOffset: [-3, -42]
});
var clus = new_object.clusterize();
myMap.geoObjects.add(clus);
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question