Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Just found another code and modified it to my situation, and its working :) Tks for the help joel ;)</p> <pre><code>&lt;style type="text/css"&gt; .scrollBox { /* The box displaying the scrolling content */ position: absolute; top: 30px; left: 200px; width: 180px; height: 200px; border: 1px dashed #aaaaaa; overflow: hidden; } .scrollTxt { /* the box that actually contains our content */ font: normal 12px sans-serif; position: relative; top: 200px; } .scrollBox2 { /* The box displaying the scrolling content */ position: absolute; top: 300px; left: 200px; width: 180px; height: 200px; border: 1px dashed #aaaaaa; overflow: hidden; } .scrollTxt2 { /* the box that actually contains our content */ font: normal 12px sans-serif; position: relative; top: 470px; } &lt;/style&gt; &lt;script type="text/javascript"&gt; var scrollSpeed =1; // number of pixels to change every frame var scrollDepth =200; // height of your display box var scrollHeight=0; // this will hold the height of your content var scrollDelay=38; // delay between movements. var scrollPos=scrollDepth; // current scroll position var scrollMov=scrollSpeed; // for stop&amp;start of scroll var scrollPos2=scrollDepth; // current scroll position var scrollMov2=scrollSpeed; // for stop&amp;start of scroll function doScroll() { if(scrollHeight==0) { getHeight(); } scrollPos-=scrollMov; if(scrollPos&lt; (0-scrollHeight)) { scrollPos=scrollDepth; } document.getElementById('scrollTxt').style.top=scrollPos+'px'; setTimeout('doScroll();', scrollDelay); } function getHeight() { scrollHeight=document.getElementById('scrollTxt').offsetHeight; } function doScroll2() { if(scrollHeight==0) { getHeight2(); } scrollPos2 -= scrollMov2; if(scrollPos2&lt; (0-scrollHeight)) { scrollPos2=scrollDepth; } document.getElementById('scrollTxt2').style.top=scrollPos2 +'px'; setTimeout('doScroll2();', scrollDelay); } function getHeight2() { scrollHeight=document.getElementById('scrollTxt2').offsetHeight; } window.onload = function(e) { doScroll(); doScroll2(); } &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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