Problem with show - hide loader

Posted on 2011-10-07
Last Modified: 2013-11-05
Hello experts.
I have a problem showing the carloader in the code below.
The page i'm loading in  the itemsholder div is working but before that i don't get the carloader div shown.
Any help?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
  <ul  class="ui-tabs-nav myitems">
     <li id="li_category2">
      <a href="">
       <span>test&nbsp;<span class="recc">(4)</span></span>
     <li id="li_category13">
      <a href="">
       <span>test2&nbsp;<span class="recc">(3)</span></span>
<div id="carloader" class="carloader" style="display:none;"><center><br><br><br><br><br><img src=""></center></div>
   <div id="itemsholder"></div>
   <script type="text/javascript" language="javascript" src=""></script>
   <script type="text/javascript">
 $(function() {
	$("ul.myitems li").click(function(e) {
        var activeTab = $(this).find("a").attr("href");
		var tabNumber = $("ul.myitems li").index(this) + 1;

Open in new window

Question by:Panos
    LVL 6

    Accepted Solution

    load is async.  When you call load, you should hide the carloader div when it completes.  See the documentation here:

    Call load like this and remove the hide() command from live 31


    Open in new window

    LVL 2

    Author Comment

    Thank you .It is working now.
    LVL 2

    Author Closing Comment

    Thank you.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now