I'm trying to make a modal with dynamically loaded content. This is my JavaScript code:
function track(id,title) {
$('#listenTrack').modal('show');
$('#listenTrack').find('.modal-title').html(title);
$.get(remote.html, function(data) {
$('#listenTrack').find('.modal-body').html(data);
});
}
And here is remote.html
<html>
<head>
<script type=text/javascript src=jquery-1.11.2.min.js></script>
</head>
<script type=text/javascript>var zippywww=26;var zippyfile=9k9lOOtw;var zippytext=#C9302C;var zippyback=#161617;var zippyplay=#ff6600;var zippywidth=320;var zippyauto=false;var zippyvol=80;var zippywave = #C9302C;var zippyborder = #cccccc;</script>
<script type=text/javascript src=https://api.zippyshare.com/api/embed_new.js></script>
</html>
I tried also without html tags, but nothing. The text content appears, not the player. And if I open remote.html
directly from the browser everything is fine.
Maybe my code is wrong.