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

  • SEARCH
  • Home
  • 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 7993587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:53:46+00:00 2026-06-04T13:53:46+00:00

This code provide a dot effect, like a loading bar( Loading., Loading.., Loading…), but

  • 0

This code provide a dot effect, like a loading bar(” Loading., Loading.., Loading…), but the problem , that only one single span id works, the second one wont, i dont know why…
please help me out guys

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function showProgressDots(numberOfDots) {

    var progress = document.getElementById('progressDots');

    switch(numberOfDots) {
        case 1:
            progress.innerHTML = '.';
            timerHandle = setTimeout('showProgressDots(2)',200);
            break;
        case 2:
            progress.innerHTML = '..';
            timerHandle = setTimeout('showProgressDots(3)',200);
            break;
        case 3:
            progress.innerHTML = '...';
            timerHandle = setTimeout('showProgressDots(1)',200);
            break;
    }
}
window.setTimeout('showProgressDots(1)',100);
//-->
</SCRIPT>

Loading<span id="progressDots" style="position:absolute;"></span>
SecondLoading<span id="progressDots" style="position:absolute;"></span>
  • 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-04T13:53:47+00:00Added an answer on June 4, 2026 at 1:53 pm

    Just posting a little plugin i made for this (for the fun of it..).

    (function($){
        $.fn['progress'] = function(_options){
            var options = {
                symbol: '.',
                delay: 200,
                length: 3,
                duration: 0
            };
            if (typeof _options === 'object'){
                $.extend(options, _options);
            } else if (_options === 'clear'){
                return this.each(function(){
                    clear.apply(this);
                });
            }
            
            function display(){
                var self = $(this),
                    txt = self.text() + options.symbol;
                if (txt.length  > options.length){
                    txt = '';
                }
                self.text( txt );
            }
            
            function clear(){
                var self = $(this),
                    timer = self.data('progressTimer');
                
                clearInterval(timer);
                self.text('');
                self.removeData('progressTimer');
            }
            
            return this.each(function(){
                var self = $(this),
                    that = this,
                    timer = null;
                
                timer = setInterval(function(){
                    display.apply(that);
                }, options.delay);
                
                self.data('progressTimer', timer);
                
                if (options.duration){
                    setTimeout(function(){
                            clear.apply(that);
                        }, options.duration);
                }
            });
        }
                             
    })(jQuery);
    

    You use it with

    // to set it
    $('some-selector').progress({/*options*/});
    
    // to stop it
    $('some-selector').progress('clear');
    

    with available options being

    • symbol the character to add on each iterations (default is .)
    • length the max number of symbols to display before it starts over (default is 3)
    • delay the time it takes for each extra symbol to be added (in milliseconds) (default is 200)
    • duration total duration (in milliseconds) before clearing the plugin (default is 0 which means no auto clearing)

    example points to jsfiddle

    $('some-selector').progress({
      symbol: '*',
      length: 10,
      delay: 100,
      duration: 5000 
    });
    

    update for comment

    To clear it automatically after some specific time just add a timeout to your code..

    so

    var progressElements = $('some-selector').progress({/*options*/}); // set the progress
    setTimeout(function(){
       progressElements.progress('clear');
     }, 1000); // 1000ms = 1 second
    

    update for 2nd comment

    changed the plugin code above to allow for a duration parameter.

    If specified, it declares the time after which the plugin will automatically clear..

    Demo at http://jsfiddle.net/gaby/gh5CD/3/ (the second loader will clear after 2 seconds)

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

Sidebar

Related Questions

I try hard to find the problem in this Java code, but I can't
This code displays times zones vertically. I would like to display them horizontally but
I have this code in Linq. Anybody can provide the t-sql. thanks! var tsr
I am able to provide animation to an image button from below code. this.RegisterName(image1.Name,
This is the code snippet that the developer site has provided for getting a
my code is like this int dateColumn = c.getColumnIndex(android.provider.CallLog.Calls.DATE); long callDate = c.getInt(dateColumn); SimpleDateFormat
This is my normal code in my VPS hosting which provide python 2.4 def
This code used to work on Vista (and Windows XP) but after an upgrade
So I will provide this code for example: $str='<title>Test title here</title><meta name=description content=test meta
I've a slight problem with jQuery animation. First I'll provide my code: <div id=xp_container>

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.