I am having an issue on my site where I am attempting to load the contents of a PHP file into a <div>. I have ruled out the possibility that it is a server-side issue, so this leads me to my question. Can you find anything wrong with the following code?
<script>
$('.navigation .responsive .menu ul li a').click(function()
{
var toLoad = $(this).attr('href');
$(".content").load(window.location.host + "/index.php?url=" + toLoad);
});
</script>
I am aware that for security reasons, browsers do not allow .load() to load content from external domains; however, would using window.location.host be an issue as it is the same domain?
window.location.host? You don't really need it.