$("
", { "id": "zoom-map", text: "Zoom in map", data-toggle: "modal", data-target: "#modal-map-body", click: function(){ $(window.parent.document.getElementById('modal-map-body')).addClass('overlay-map').html('<iframe src="*"></iframe>'); $(window.parent.document.getElementById('start-map')).click(); } }).insertAfter("ul.map-visible-list");
$("
", { "id": "zoom-map", "text": "Zoom in map", "data-toggle": "modal", "data-target": "#modal-map-body", click: function(){ $(window.parent.document.getElementById('modal-map-body')).addClass('overlay-map').html('<iframe src="*"></iframe>'); $(window.parent.document.getElementById('start-map')).click(); } }).insertAfter("ul.map-visible-list");
$('
', { ... }).insertAfter("ul.map-visible-list").data('toggle', 'modal').data('target', "#modal-map-body");
Find more questions by tags JavaScriptjQuery