I’m currently using JCarousel to highlight “featured posts” in WordPress. The carousel displays above the fold, as part of our header. It works well once it loads, but since we’re using it above the fold on a large page with many elements, it has to wait for our entire page to load before it will initiate and display our featured posts. This means it sits there with a “loading” gif for 5-10 seconds, and most users will just scroll by it rather than wait for it to load.
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#mycarousel').jcarousel({ scroll : 2 });
});
</script>
This slow loading is bothersome, and therefore, I’d like to have the carousel load first, so it will show up before the rest of the page has loaded. Is there any way for me to do this?
Any suggestions would be greatly appreciated. Thanks!
Just as a followup, here’s what I ended up doing to solve my problem:
Since the Facebook widget and Twitter widgets in my sidebar took forever to load, and were loading before the carousel, I turned them into external javascripts (loaded the Facebook iframe through a javascript using this method: http://www.seomofo.com/wordpress/tweetmeme-retweet-button.html) and called them on window.onload, so they would start loading dead last.
Now the jcarousel loads before both Facebook and Twitter’s widgets, making it show up sooner and appear to take much less time to load. Although I believe my overall page load time is the same, I at least found a way to rearrange things so the items at the top of my page would show up before the slow-loading widgets in the sidebar.
Thanks for all your help! Glad to have this resolved.