jQuery Message Scrolling
Add-ons

Plugin description: An extremely simple jQuery message scrolling plugin with clean and practical code.
Last updated: 2020-05-05 22:27:27
Changelog:The usage method has been restructured. The functionality remains unchanged, but it is now more convenient to use.
Usage instructions:
Include the JS and CSS files.
1 2 3 | <link rel="stylesheet" type="text/css" href="./css/index.css"/><script src="./js/index.js" type="text/javascript" charset="utf-8"></script> |
js
1 2 3 4 5 | $("#file0").Messageroll({ limit: 3, // Number of messages to display. Default: 3 cease: false, // Whether scrolling pauses when the mouse hovers over it. Default: false spend: 2000, // Interval time. Default: 2000}); |
body:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <ul id="file0"> <li> <img src="img/t1.png"> <h3>This is the first message</h3> <p>Today is Wednesday and the weather is sunny</p> </li> <li> <img src="img/t2.png"> <h3>This is the second message</h3> <p>Today is Wednesday and the weather is sunny</p> </li> <li> <img src="img/t3.png"> <h3>This is the third message</h3> <p>Today is Wednesday and the weather is sunny</p> </li> <li> <img src="img/t4.png"> <h3>This is the fourth message</h3> <p>Today is Wednesday and the weather is sunny</p> </li> <li> <img src="img/t5.png"> <h3>This is the fifth message</h3> <p>Today is Wednesday and the weather is sunny</p> </li> <li> <img src="img/t3.png"> <h3>This is the sixth message</h3> <p>Today is Wednesday and the weather is sunny</p> </li></ul> |
Last updated: 2020-04-12 23:27:25
Uses a timer, prependTo, and the slideDown property. Although the implementation may look basic, the code is concise and the effect is clear and practical.
评论