Youss
Youss

Reputation: 4212

using event load with feedBurner

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

Answers (1)

Riz
Riz

Reputation: 10246

You can use AJAX to get contents and if that contents are JS, you can execute that using eval.

Upvotes: 1

Related Questions