Skip to content

zhuobinggang/roll-notice.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A simple lib to roll your notice

01

02

03

Usage

<div id="notice">这是一个公告</div>

<!-- Require jquery -->
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<!-- Require the lib -->
<script src="./lib/roll_notice.js"></script>
<script>
    //Just use the global function
    roll_notice({ id: 'notice' })
</script>

DEMO

DEMO(ch)

DEMO(en)

Options

roll_notice({ 
    id = 'notice', //Id of the div you want it to roll
    interval = 50, //50 ms per step/frame
    step = 2, //Pixels to move Every steps/frames
    rest_time = 3000, //How many ms to rest when touched the border
})

About

📢 Rolling your notice horizontally.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published