I'm having a major problem here and I'm running out of options. I hope someone can help me.
I have a link that loads content in a div after it is clicked. I'm using jQuery .get to retrieve the content (which by the way is hosted on the same server). This is what I have:
<a href="#" id="button">Link</a>
<div id="box"></div>
$(document).ready(function(){
$("#button").click(function () {
$.get("includes/data.php", function(data) {
$("#box").html(data);
});
});
});
This is the content of data.php. No doctype, no head, no body:
<div class="info-box-content">
<script>map.findMovieClipByString('map')</script>
<h1>Name</h1>
<h2>Address</h2>
<p>More content here</p>
</div>
The tricks works as expected but the script line won't load. It looks like it gets stripped off automatically. I tried to add a doctype, head and body, but nothing.
Does .get prevent scripts to be loaded? Is there a way around it?
Thank you for your insight.