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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:41:43+00:00 2026-06-14T15:41:43+00:00

I want to create an marquee that start at first, but every 10 seconds,

  • 0

I want to create an marquee that start at first, but every 10 seconds, the marquee will stop for 5 seconds before the marquee start again.

How can I do that?

I only manage to create a timer that stop the marquee after 5 seconds :

<script>
    function startLoop() {
    setInterval( "doSomething()", 5000 ); }
    function doSomething() {
    document.getElementById('myMarquee').stop(); }
</script>

HTML

<body onload="startLoop();">
   <marquee direction="right" id="myMarquee">This is a marquee.</marquee>
</body>
  • 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-14T15:41:44+00:00Added an answer on June 14, 2026 at 3:41 pm

    A few days ago I needed something similar to your problem. I soon figured out that marquee is not a standard element, so you can’t use it in cross-browser solutions.

    I have extracted the animation part, based on jQuery, I used in my solution, you can see the effect in this jsFiddle

    HTML

    <div id="container">
        <div id="mytext">
            this is a simple text to test custom marquee
        </div>
    </div>​
    

    CSS

    #container
    {
        display: inline-block;
        background-color: #cccccc;
        width: 100px;
        height: 100px;
        overflow: hidden;
    }
    #mytext
    {
        display: inline-block;
        position: relative;
        white-space: nowrap;
    }
    ​
    

    JavaScript

    $(function() {
        var txt = $("#mytext");
        txt.bind('scroll', function () {
            var el = $(this);
            // Scroll state machine
            var scrollState = el.data("scrollState") || 0;
            el.data("scrollState", (scrollState + 1) % 4);
            switch (scrollState) {
                case 0: // initial wait
                    el.css({ left: 0 });
                    el.show();
                    window.setTimeout(function () {
                        el.trigger("scroll");
                    }, 5000);
                    break;
                case 1: // start scroll
                    var delta = el.parent().width() - el.width();
                    if (delta < 0) {
                        el.animate({ left: delta }, 2000, "linear", function () {
                            el.trigger("scroll");
                        });
                    }
                    break;
                case 2: // delay before fade out
                    window.setTimeout(function () {
                        el.trigger("scroll");
                    }, 2000);
                    break;
                case 3: // fade out
                    el.fadeOut("slow", function () {
                        el.trigger("scroll");
                    });
                    break;
            }
        }).trigger("scroll");
    });​
    

    It doesn’t do exaclty the same as your requirement, but if you read the code and make some changes to the state-machine, you will get it working 🙂

    • 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 Marquee that scrolls some news articles but when the
I want create a tarball that when extracted the file(s) will be placed at
I want create a cache so that when an item doesn't exist, only one
I want to create an animated HTML marquee that scrolls back and forth on
I want create an array in JSF EL. How can I do that? Is
I want create a ruby script that I can run on the command line
I want to Create a Marquee that when text Exit from one Side and
I want create a project where every user can have his own 'homepage'. So
I want create wordpress website into which I want create user management... That means
i want create a custom json data from the mssql 2008 results so that

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.