Код: Выделить всё
44.42, 26.95
45.30, 21.88
Код: Выделить всё
var geo=$(this).find('geo').map(function(i,v){return ($(v).text());}).get();
for (i=0;i 0 && typeof geo[0] === 'string' && geo[0].includes(',')) {
const coords = geo[i].split(',').map(Number);
var lat = coords[0]; var long = coords[1];
var sub = $(this).find("geo").map(function(i,v){return ($(v).attr('comp'));}).get();
console.log(sub);
}
Код: Выделить всё
(2) ['HQ', 'SA plant']
Подробнее здесь: https://stackoverflow.com/questions/798 ... ing-jquery
Мобильная версия