JSFiddle - React, Tailwind, and code Playground
CSS
#results {
font-family: Helvetica, Arial, Sans-Serif;
font-size: 12px;
list-style: none;
padding: 0;
}
#results li {
display:block;
color:#000000;
line-height:30px;
border-bottom: solid 1px #CCCCCC;
padding:0 10px;
cursor: pointer;
}
#results li:hover {
color:#FFFFFF;
font-weight: bold;
background-color: lightblue;
}
JavaScript
fetch('https://val202.rtvslo.si/')
.then((res) => {
return res.text();
})
.then((data) => {
$('#container').html(data);
});
function displayResults( data ){
$("#results").empty();
data.features.forEach(function(feat){
var label = feat.properties.label;
$("#results").append('<li>'+label+'</li>');
});
};