Answers for "razor pages and javascript"

0

razor pages and javascript

<!--HTML-->
@foreach(var item in Model)
{
    <div data-marker="@Json.Encode(item)"></div>
}

<!--Javascript-->
$('[data-marker]').each(function() {
    var markerData = $(this).data('marker');
    addMarker(markerData.Latitude, markerData.Longitude,
              markerData.Description, markerData.Title);
});
Posted by: Guest on November-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language