add fav btn+ event
This commit is contained in:
parent
c1037d893e
commit
4c7f4357d2
@ -131,6 +131,13 @@ const metadata = {
|
||||
})
|
||||
const poiMarker = L.marker([element.geometry.coordinates[1],element.geometry.coordinates[0]],icon)
|
||||
.bindPopup(`<b>${prop.name}</b><br/>note : ${prop.rate} <br/>tags:<br/> ${tags} <p>favori : <p> <input type="checkbox" name="like" id=${element.id}/>`)
|
||||
.on("click", () => {
|
||||
document.querySelectorAll<HTMLInputElement>('input[name="like"]').forEach(e => {
|
||||
e.addEventListener("click", () => {
|
||||
console.log("poeut");
|
||||
})
|
||||
})
|
||||
})
|
||||
poiMarker.addTo(map)
|
||||
poiMarkers.push(poiMarker)
|
||||
})
|
||||
@ -197,4 +204,5 @@ const metadata = {
|
||||
searchBox()
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user