Hello.
I connect Yandex maps API. Like this
<script src="//api-maps.yandex.ru/2.0/?load=package.standard&lang=ru-RU" type="text/javascript"></script> I show the map by clicking on the link (the block unfolds).
$('#map-[[+id]]-link').on("click", function(){ if(!$(this).hasClass('visible')){ ymaps.ready(init); function init(){ var myMap = new ymaps.Map ("map-[[+id]]", { center: [[[+tv.coord]]], zoom: 15, }); var myPlacemark1 = new ymaps.Placemark([[[+tv.coord]]]); myMap.geoObjects.add(myPlacemark1); } $(this).addClass('visible'); } return false; }); [[+ tv.coord]] etc. - placeholders, which are replaced in html with specific values. Works in all browsers except Firefox. The latter gives this error
ReferenceError: init is not defined ymaps.ready (init);
Although I check in the console: the ymaps object exists.
What could be the problem?
Thank you.