JSFiddle - React, Tailwind, and code Playground
by xandeadx xandeadx
HTML
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">
<a href="#" id="map-link">Open map</a>
JavaScript
$(function() {
$('#map-link').click(function(event) {
event.preventDefault();
$('<div id="map"></div>').dialog({
open: function() {
var mapScript = document.createElement('script');
mapScript.src = 'https://api-maps.yandex.ru/services/constructor/1.0/js/?sid=jvKcVQ-lJli8xA_UQVsUIOEHq1rC3t-W&lang=ru_RU&sourceType=constructor&scroll=true';
this.appendChild(mapScript);
},
close: function() {
$(this).remove();
},
title: 'Кремль',
width: 500,
height: 350,
modal: true
});
});
});