-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrss-feeder.js
55 lines (48 loc) · 1.31 KB
/
rss-feeder.js
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// JavaScript Document
// JSHINT used for Dreamweaver
/* jshint strict: false */
// Scroll News Feed
function marquee(current) {
return setInterval(function(){
$(current).stop()
.animate({scrollTop:40},400,'swing',function(){
$(this).scrollTop(0).find(current+'-item:last').after($(current+'-item:first', this));
});
}, 2000);
}
var twitterDiv = marquee('.twitter-news');
var blogDiv = marquee('.blog-news');
$(document).ready(function(){
$('.twitter-news').hover(
function(){clearInterval(twitterDiv);},
function(){twitterDiv=marquee('.twitter-news');}
);
$('.blog-news').hover(
function(){clearInterval(blogDiv);},
function(){blogDiv=marquee('.blog-news');}
);
});
/*
setInterval(function(){
$('.marquee').stop()
.animate({scrollTop:40},400,'swing',function(){
$(this).scrollTop(0).find('.marquee-item:last').after($('.marquee-item:first', this));
});
}, 2000);
function marquee(current) {
current.stop().animate({scrollTop:40},400,'swing',function(){
$(this).scrollTop(0).find('.marquee-item:last').after($('.marquee-item:first', this));
})
}
$(document).ready(function(){
setInterval(marquee($('.marquee')), 2000);
$('.marquee').hover(
function(){
clearInterval(setInterval(marquee($(this)), 2000));
},
function(){
setInterval(marquee($('.marquee')), 2000);
}
);
});
*/