Jquery universal scroll effect, single line of text, multi-line stay scroll, text scroll up or down

Source: Internet
Author: User

Direct parameter assignment:

<Script type = "text/javascript">
New Marquee ("Marquee", 760,104)
New Marquee ("Marquee", null, null, 760,104, null, 5000, null,-1)
</Script>

Dynamic parameter assignment:

<Script type = "text/javascript">
Var Marquee1 = new Marquee ("Marquee") * this parameter is required.
Marquee1.Direction = "top"; or Marquee1.Direction = 0;
Marquee1.Step = 1;
Marquee1.Width = 760;
Marquee1.Height = 52;
Marquee1.Timer = 50;
Marquee1.DelayTime = 5000;
Marquee1.WaitTime = 3000;
Marquee1.ScrollStep = 52;
Marquee1.Start ();
</Script>

 

Parameters related to MSClass are as follows:

Attribute Type Default Description
ID String Required Container ID, which is specified by the first parameter of new Mraquee ("")
Direction Integer 0 Scroll direction (0 by default) value: 0 top 1 bottom 2 left 3 right-1 up and down alternate 4 left
Step Integer/array 2 Scroll step (the larger the value, the faster the scroll, less than 1 switch to slow. If it is in the form of an array [0.5, 20], you can set the easing category of Tween. 0.5 is the coefficient, and 20 is the easing category)
Width Integer Container initial width Container visible width (default value: the initial width of the container)
Height Integer Height of the initial container settings Container visible height (the default value is the initial height of the container)
Timer Integer 30 Timer, that is, frequency/execution cycle (the default value is 30, the smaller the value, the faster the scroll speed, 1000 = 1 second, it is recommended not less than 20)
DelayTime Integer 0 Interval pause delay time (0 by default, 1000 = 1 second)
WaitTime Integer 0 Start Time (no wait by default or 0, 1000 = 1 second)
Scrollstep Integer 0 Intermittent scroll spacing (the default value is screen flip width/height. The value is-2. If delaytime is 0, the mouse is suspended.-1 disables mouse control)
Switchtype Integer 0 Wheel display type (0 scroll by default, optional value: 1 cut-in, 2 fade-in)
Hiddenid String/Array Null Hide area ID (optional) if the hidden area has only one layer, it can be in the form of "hiddenid". If there are multiple layers, use the array ["hiddenid1 ", "hiddenid2)
Note: The preceding parameters apply the direct value Assignment Method in different order, for example, new Marquee ("Marquee", 760,104, 0, 0, ["hiddenid1 ", "hiddenid2"])
Msclassid String Required for object assignment Container ID
Contentid String Ul + Li, dl + dt + dd required For Div + CSS applications, it is the ID of the content area in the display container, that is, the ID of the actual content container ul or DL.
Tabid String/Array Page number/TAB ID (Optional) if the page number/TAB support is required, pass the relevant ID in. If multiple tab applications are required, pass them as arrays, for example, ["tabid1", "tabid2"].
Tabevent String Onmouseover (Optional) page number/TAB mouse response mode. The default value is "onmouseover". The cursor is switched over (optional value: "onclick ")
Tabtimeout Integer Mouse response latency (Optional) latency of page number/TAB mouse response. The time of the mouse RESPONSE event (tabevent) is valid only after the specified time.
MSClass Array/Object If this option is set
You do not need to set the preceding five items.
Quick settings: ["msclassid", "contentid", "Tabid", "tabevent", 200] correspond to the preceding parameters respectively. Do not enter unnecessary parameters, for example, ["msclassid", "contentid"];

{MSClassID: "MSClassID", ContentID: "ContentID", TabID: "TabID", and TabTimeout: 200} correspond to the preceding parameters respectively. Do not omit unnecessary parameters.

Contextmenu Array   Right-click the menu. Optional. It is disabled by default. The format is [1, ["menu1"], [], ["menu2", "FN ()"]. (0/1, enable/disable; ["menu1"] not clickable, [] separator, ["menu2", "FN ()"] clickable and clickable events)
Prevbtnid String   The ID of the element that executes the next scroll. Optional. Valid for intermittent scrolling.
Nextbtnid String   The ID of the element that executes the last scroll, which is valid for intermittent scrolling.
Autostart Boolean Valid for object assignment Set whether to enable the application to automatically execute the object assignment (skip the start step ). Optional values: 0, 1, true, and false

Http://www.popub.net/script/MSClass.html



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.