• home
  • forum
  • my
  • kt
  • download
  • Pausing up-down message scroller

    Author: 2007-08-08 09:38:48 From:

    Directions Developer's View

    Step 1: Insert the below code in the <head> section of your page:

    Select All

    Step 2: Then, inside the BODY section of your page, to display a scroller, simply use the below example code:

    Select All

    The code of Step 2 illustrates how to invoke a scroller instance:

    new pausescroller(pausecontent, "pscroller1", "someclass", 3000)

    Where "pausecontent" is the name of the array defined earlier that contains your scroller messages, and "pscroller1", an arbitrary but unique CSS ID for that scroller. "someclass" is simply an random CSS classname you can pass to add additional style to the scroller, and "3000" points to the pause time between messages, in milliseconds.

    As mentioned, all styling to the scroller is simply done via external CSS, such as:

    #pscroller1{
    width: 200px;
    height: 100px;
    border: 1px solid black;
    padding: 5px;
    background-color: lightyellow;
    }

    To display a single lined scroller like in the 2nd example above for example, you'd simply change the "height" property to a small number such as 25px.

    Pause then scroll- that's the way to do it!

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      AJAX (20)
      Content Management (7)
      Cookies (4)
      Date and Time (12)
      Development (7)
      DHTML (14)
      Forms (8)
      Frequently Asked Questions (1)
      Image Display (9)
      Introduction to Javascript (5)
      Links and Buttons (4)
      Menus (2)
      Miscellaneous (5)
      Mouse Tricks (3)
      Navigation (8)
      Randomizing (4)
      Security (1)
      Text Effects (6)
      User Authentication (2)
      User Information (5)
      Windows and Frames (3)

    New

    Hot