<marquee> effect

The default <marquee> tag of HTML does not have a smooth animation. To get the smooth animation, you need to download external jQuery library and include it in your project and then use it.

We simply skipped the first 2 steps, you do not need to download any library, and you do not need to include it in your project. You just need to call our API function and tell the HTML node using selector where you want to have the marquee effect.

How to use ?

First, you simply need to give your HTML node an ID or class that will be used to initialize the marquee effect.

Then after the SDK is initialized, you need to attach an onload at line #9 event listener to call the function when the SDK is fully loaded.

Most important lines here are:

It has three parameters:

  1. the selector (ID, class or tag name)
  2. the message that will be displayed in marquee
  3. (optional) custom options. It has the following options:
    • duration: (number) It is the number of seconds that will take to complete the marquee effect.
      • type: number
      • default: 40
    • direction: Its value can be either "rtl" (right to left) or "ltr" (left to right).
      • type: string
      • default: rtl
      • possible values: "rtl" or "ltr"