My website is dynamic, so in a sense, the website is only one page, but that one page (Home Page) loads different content depending on links pressed, url changes, etc.. On my navigation bar, I have different links: about, blog, portfolio, resume, and contact. When I click on blog, I want to (1) load the blog.html
code into the body
of my Home Page and (2) execute the external javascript code that loads my blog RSS by Feedburner.
I've tried:
$.getScript(...);
- creating a
script
tag dynamically $(window).ready(...);
Note: I can't put the script
tag in Home Page's head
tag because wherever the script
tag is, is where the external code is displayed (and I need it displayed in <div class='content' id='blog-page'>
.
Home Page:
<html>
...
<body>
<div id="content"></div> <!-- Dynamic div -->
<script>
<!-- updateContent is called when URL changes, page loads, etc... -->
function updateContent(page) {
$('div#content').load('../../' + page + '.html');
};
</script>
</body>
</html>
Dynamic Content (pulled into Home Page):
<div class='content' id='blog-page'>
<script src="http://feeds.feedburner.com/blogspot/bVDtI?format=sigpro" type="text/javascript"></script>
...
</div>
Any Ideas???? I'm at a total loss...
Found the answer.