forked from harim061/majorFront
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlast.js
More file actions
25 lines (23 loc) · 615 Bytes
/
Copy pathlast.js
File metadata and controls
25 lines (23 loc) · 615 Bytes
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
$(document).ready(function(){
var height = $(".banner").height();
var num = ($(".rolling li").length)/2;
var max = height * 10;
var move = 0;
function noticeRolling(){
move += height;
$(".rolling").animate({"top":-move},600,function(){
if( move >= max ){
$(this).css("top",0);
move = 0;
};
});
};
noticeRollingOff = setInterval(noticeRolling,3000);
$(".rolling").append($(".rolling li").first().clone());
$(".rolling_stop").click(function(){
clearInterval(noticeRollingOff);
});
$(".rolling_start").click(function(){
noticeRollingOff = setInterval(noticeRolling,2800);
});
});