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 7784639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:07:38+00:00 2026-06-01T20:07:38+00:00

I want to replace the text in a ‘div span’ with text from an

  • 0

I want to replace the text in a ‘div span’ with text from an array. I’d like this simple animation to do two things…

  1. Fly or fade the text in randomly
  2. Loop continously

I have a fiddle setup where I’ve been trying different things; http://jsfiddle.net/fmdfrank/W47QV/

Anybody?

  • 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-01T20:07:39+00:00Added an answer on June 1, 2026 at 8:07 pm

    use jquery .queue & .dequeue to store each operation in the fx queue. this will let the text change behave as part of the animation queue. then check if you need to loop.

    in a fiddle: http://jsfiddle.net/W47QV/4/

    $(document).ready(function() {
    
        var items = ["Two", "Three", "Four", "Five", "Six", "One"],
            $text = $( '#div1 span' ),
            delay = 2; //seconds
    
        function loop ( delay ) {
            $.each( items, function ( i, elm ){
                $text.delay(delay*1E3).fadeOut();
                $text.queue(function(){
                    $text.html( items[i] );
                    $text.dequeue();
                });
                $text.fadeIn();
                $text.queue(function(){
                    if(i == items.length-1){
                        loop(delay);   
                    }
                    $text.dequeue();
                });
            });
        }
    
        loop(delay);
    
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a link like this: <a href=http://example.com>text</a> and replace the behavior
I want to replace text from a certain range in my HTML file (like
Hello i want to replace the text in div when user click on it
I have two MySQL tables, and I want to find and replace text strings
i want to replace the alphabets with numbers from a text box and display
I have such simple example. I want to replace text in for example add
I want to Replace Cufon text in Div but its not proper working in
I want to replace special characters in string. For example this is input text
I want to replace the text in UITextView text in selected range. This is
I want to replace some text to other text which contains elements of basic

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.