Reputation: 4212
I'm using google feedburner to show feeds on my website. The sript looks like this:
<div>
<script src="http://feeds.feedburner.com/nu/gbKB?format=sigpro" type="text/javascript" ></script></div>
As you can see I have placed it in a div. The problem is that I don't want to load the script on page load/document ready. I rather have the div loaded on a click of a button. So I tried Jquery event load. I placed the script on a blank document and saved as html page. I then placed this html page on my server and I tried calling it with jquery like this:
$('#button').click( function(event) {
$('div').load('feed.html');
});
This doesn't work for me.
Upvotes: 0
Views: 166
Reputation: 10246
You can use AJAX to get contents and if that contents are JS, you can execute that using eval
.
Upvotes: 1