jQuery Message Scrolling

Add-ons
2026-07-25 23:09 4 次浏览 • 0 次下载 13.8KB
jQuery Message Scrolling

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.

星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare