How to inject data content from external json into a modal, using UIkit?
Ok. The solution I found out, was more simple than I thought. On the script use “jQuery” instead of “$”. HTML trigger: <a href=”#myModal” onclick=javascript:openModal({{id}})><article>… </article></a> function openModal(id){ jQuery.ajax({ type: “GET”, url: ‘https://www.example.json’ + id, dataType: ‘json’, success: function(data) { var data = data.T.ads; var infoModal = jQuery(‘#myModal’); infoModal.find(‘.uk-modal-title’).html(data[0].brand + ‘ ‘ + data[0].model); htmlData=”<p>” … Read more