在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:wmh/jquery-scrollbox开源软件地址:https://github.com/wmh/jquery-scrollbox开源编程语言:JavaScript 100.0%开源软件介绍:This package is abandoned and no longer maintained. The author suggests using the Owl Carousel 2 plugin instead. jQuery ScrollboxjQuery Scrollbox is a lightweight plugin that enables you to scroll a list of html elements (text, image, etc...) like a carousel slider or traditional marquee. Features
Basic Usage1. Include the latest jQuery library and jQuery Scrollbox Plugin on the page<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="jquery.scrollbox.js"></script> 2. Create a list of text you want to scroll<div id="demo" class="scroll-text">
<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>
</div> 3. Style html elements as below4. Initialization$('#demo').scrollbox(); Demoshttp://wmh.github.io/jquery-scrollbox/ More examplesNon-infinite Loop$('#demo').scrollbox({
infiniteLoop: false,
switchAmount: 3
}); Callback functions$('#demo').scrollbox({
afterForward: function (data) {
console.log(data.currentFirstChild);
if (data.switchCount >= 3) {
this.trigger('backward');
}
},
afterBackward: function (data) {
console.log(data);
}
}); LicensejQuery Scrollbox is open-sourced software licensed under the MIT license |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论