Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8290301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:46:01+00:00 2026-06-08T12:46:01+00:00

The following code works except for the jQuery part. The code makes 6 dots

  • 0

The following code works except for the jQuery part.
The code makes 6 dots black and stops the interval, but does not fadeIn the div with the id “cs”.

What’s my mistake?

<html>
<head>
<style type="text/css">
    .dot
    {
        background-color:#666;
        width:10px;
        height:10px;
        border:1px solid lightgray;
        margin-right:1px;
        float:left;
    }
    body {
            background:url('images/bg.png');
            width:100%;
    }
    #wrapper {
        margin-left: auto; 
        margin-right: auto; 
        width:1000px;
        position:relative;
    }
    #cs {
        visibility:hidden;
        float: left;
    }
    #loader {
        margin-top:20px;
        padding-left:10px;
    }
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript">


(function() {
    var delayInSeconds = 0.5;                           
    var num = 0;
    var changeDot = function() {
        document.getElementById('dot' + num).style.backgroundColor = "#000";
        num++;
        if(num == 6)
        {
            $('#cs').fadeIn('slow');
            window.clearInterval(int);
        }
    };
   var int = window.setInterval(changeDot, delayInSeconds * 1000);
})();
</script>
</head>
<body>
<div id="wrapper">
    <div id="name">
        <img src="images/as.png"/>
    </div>
    <div id="loader">
        <div id="dot0" class="dot"></div>
        <div id="dot1" class="dot"></div>
        <div id="dot2" class="dot"></div>
        <div id="dot3" class="dot"></div>
        <div id="dot4" class="dot"></div>
        <div id="dot5" class="dot"></div>
        <div id="dot6" class="dot"></div>
        <div id="dot7" class="dot"></div>
        <div id="dot8" class="dot"></div>
        <div id="dot9" class="dot"></div>
        <div id="dot10" class="dot"></div>
        <div id="dot11" class="dot"></div>
        <div id="dot12" class="dot"></div>
        <div id="dot13" class="dot"></div>
        <div id="dot14" class="dot"></div>
        <div id="dot15" class="dot"></div>
        <div id="dot16" class="dot"></div>
        <div id="dot17" class="dot"></div>
        <div id="dot18" class="dot"></div>
        <div id="dot19" class="dot"></div>
        <div id="dot20" class="dot"></div>
    </div>
    <div id="cs">
        <img src="images/cs.png"/>
    </div>
</div>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:46:04+00:00Added an answer on June 8, 2026 at 12:46 pm

    Use display instead of visibility:

    #cs {
        display:none;
        float: left;
    }
    

    Also this may be useful: Why does jQuery show/hide use display:none instead of visibility:hidden?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code works as expected on CentOS and Ubuntu O/s but not on
The following code works with Visual Studio 2008 but not with GCC/G++ 4.3.4 20090804.
The following code works fine on Linux but throws an exception on OS X
The following code works in all browser but IE8 and below. // Create Paragraph
The following code works fine in firefox but as with many other things, I
The following code works, but I can't figure out what's going on memory-wise. Where
The following code works successfully, except the menu slideDown only works on the second
I have the following JQuery code which does similar functionality like Stackoverflow where the
ok, so this is weird. the following code works in all browsers, except in
The following code works fine: person = {:a=>:A, :b=>:B, :c=>:C} berson = {:a=>:A1, :b=>:B1,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.