Reputation: 297
So here is what I am trying to achieve. I currently have a FeedBurner script in my webpage. I use the <script>
tags for the feed and when the page loads, the script generates the feed HTML. What I'm trying to do is to have all the HTML associated with the feed to preload and then fade in. I tried putting the script in an external file and making an Ajax call but that didn't actually wait till everything was finished loading.
I am currently using jQuery.
Thanks.
Upvotes: 0
Views: 139
Reputation: 178
Use the ajax call on window.load like Sushanth said along with appending it with display:none and then fading it in.
$(window).load(function() {
$content = $.get();
$content.css('display', 'none').appendTo('#my_element').fadeIn()
});
Upvotes: 0
Reputation: 2845
You can use your JS function like this on your body part.
<body onload="func()">
Upvotes: 0
Reputation: 55750
Put that code in window load
function instead of DOM Ready
$(window).load(function() {
// Make ajax request here and check if that helps
});
Upvotes: 1