JSFiddle - React, Tailwind, and code Playground

by Nikolay Petrov

HTML

<script src="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.css">
<div id="map_canvas"></div>

CSS

html { 
    height: 100% 
}

body { 
    height: 100%; 
    margin: 0; 
    padding 0;
}

#map_canvas {
    height: 100%; 
    width: 100%; 
    position: absolute
}

JavaScript

var map = L.map('map_canvas').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tiles.mapbox.com/v3/mapbox.mapbox-light/{z}/{x}/{y}.png', {
    attribution: 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
    maxZoom: 18,
}).addTo(map);

var marker = L.marker([51.5, -0.09]).addTo(map);

marker.bindPopup('Testing the Link: <a href="#" class="speciallink">TestLink</a>');

map.on('popupopen', function() {
    $('.speciallink').click(function() {
        alert('Clicked the Link');
    });
});