Note that there are some explanatory texts on larger screens.

plurals
  1. POmarque like with javascript
    primarykey
    data
    text
    <p>Hello again i found a great script that does almost what i want the problem is that its not moving on its own when the page loads can we change it to do that? The idea was to make scrolling down messages i want to make it to make a loop so il have a message and it will move from top to bottom but it will never stop moving like a marquee thanks in advance! </p> <pre><code> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;script type="text/javascript"&gt; scrollStep=1 timerUp="" timerDown="" function toTop(id){ document.getElementById(id).scrollTop=0 } function scrollDivDown(id){ clearTimeout(timerDown) document.getElementById(id).scrollTop+=scrollStep timerDown=setTimeout("scrollDivDown('"+id+"')",10) } function scrollDivUp(id){ clearTimeout(timerUp) document.getElementById(id).scrollTop-=scrollStep timerUp=setTimeout("scrollDivUp('"+id+"')",10) } function toBottom(id){ document.getElementById(id).scrollTop=document.getElementById(id).scrollHeight } function stopMe(){ clearTimeout(timerDown) clearTimeout(timerUp) } &lt;/script&gt; &lt;style&gt; #display{ width:200px; height:150px; overflow:hidden; text-align:left; border:1px solid black; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;a href="#null" onclick="toTop('display')"&gt;Top&lt;/a&gt; &lt;a href="#null" onmouseover="scrollDivDown('display')" onmouseout="stopMe()"&gt;ScrollDown&lt;/a&gt; &lt;a href="#null" onmouseover="scrollDivUp('display')" onmouseout="stopMe()"&gt;Scroll Up&lt;/a&gt; &lt;a href="#null" onclick="toBottom('display')"&gt;Bottom&lt;/a&gt; &lt;div id="display"&gt; &lt;b&gt;LAYER CONTENTS&lt;/b&gt; &lt;P&gt;Dummy Text&lt;P&gt;Dummy Text&lt;P&gt;Dummy Text&lt;P&gt;Dummy Text &lt;P&gt;Dummy Text&lt;P&gt;Dummy Text&lt;P&gt;Dummy Text&lt;P&gt;Dummy Text &lt;P&gt;Dummy Text&lt;P&gt;Dummy Text&lt;P&gt;Dummy Text&lt;P&gt;Dummy Text &lt;P&gt;Dummy Text&lt;P&gt;Dummy Text&lt;P&gt;Dummy Text&lt;P&gt;End &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>i want to do something like this so it will make a loop:</p> <pre><code>function scrollDown(id){ clearTimeout(timerDown) document.getElementById(id).scrollTop+=scrollStep if (document.getElementById(id).scrollTop=document.getElementById(id).scrollHeight){ document.getElementById(id).scrollTop=0 } } &lt;div id="display" onmouseout="scrollDown('display')" onmouseover="stopMe()"&gt; </code></pre> <p>and under this div its the messages </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload