Is there an alternative to innerHTML? There is a code coming from the server: PHP:
$html = ' Тут див с фотографией <script src="../assets/js/app.js"></script> <script src="../assets/js/plugins/magnific-popup/magnific-popup.min.js"></script> <script> jQuery(function () { App.initHelpers(\'magnific-popup\'); }); </script> '; We get it and need to display it.
document.getElementById('content').innerHTML = data.html; But there is a problem. Если в innerHTML есть тег script – он не будет выполнен. If it is output via append, then everything works, but the text is added to the already existing text, and a replacement is needed, as innerHTML does
appendto do? - teran