forked from kpthomp1/cn-ticker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtopstories.html
More file actions
executable file
·170 lines (136 loc) · 4.17 KB
/
topstories.html
File metadata and controls
executable file
·170 lines (136 loc) · 4.17 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<div class="section-container">
<div class="demo-box">
<!-- DEMO4 HTML STARTS HERE *-->
<!-- *********************** -->
<div class="breaking-news-ticker" id="newsTicker4">
<div class="bn-label"> <img src="img/cn-logo.png"><font size="4"> Headlines</font></div>
<div class="bn-news">
<ul>
<li><span class="bn-loader-text">Data loading...</span></li>
</ul>
</div>
</div>
<!-- *********************** -->
<!-- DEMO4 HTML END HERE *** -->
</div>
</div>
<head>
<meta charset="UTF-8">
<title>Breaking News Ticker Examples</title>
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>
<!--Adding demo page css file -->
<link rel="stylesheet" type="text/css" href="./demo-page-styles.css">
<!--Adding plugin css file -->
<link rel="stylesheet" type="text/css" href="./breaking-news-ticker.css">
</head>
<!-- Adding jquery library. minimum version 1.10.0 -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="./breaking-news-ticker.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$('#newsTicker1').breakingNews();
//$('#newsTicker2').data('breakingNews').next();
$('#newsTicker2').breakingNews({
direction: 'rtl'
});
$('#newsTicker3').breakingNews({
themeColor: '#f9a828',
effect: 'slide-left'
});
$('#newsTicker4').breakingNews({
themeColor: '#2C4380',
source: {
type:'rss',
usingApi:'rss2json',
rss2jsonApiKey: 'zu5enwwxwzxyc2ogprt5fmhi6lgdvhizyft9s1g8',
url:'https://news.google.com/news/rss',
limit:20,
borderWidth: 0,
showingField:'title',
linkEnabled: true,
target:'_blank',
seperator: '<span class="bn-seperator" style="background-image:url(img/cn-logo.png);"></span>',
errorMsg: 'RSS Feed not loaded. Please try again.'
}
});
$('#newsTicker5').breakingNews({
effect: 'typography'
});
$('#newsTicker6').breakingNews({
source: {
type:'json',
url:'https://jsonplaceholder.typicode.com/posts',
limit:20,
showingField:'title',
linkEnabled: false,
target:'_blank',
seperator: '<span class="bn-seperator" style="background-image:url(img/cn-logo.png);"></span>',
errorMsg: 'Json file not loaded. Please check the settings.'
}
});
$('#newsTicker7').breakingNews({
themeColor: '#11cbd7',
background: 'transparent',
borderWidth: 0,
source: {
type:'rss',
usingApi:'YQL',
url:'http://feeds.bbci.co.uk/news/rss.xml',
limit:20,
showingField:'title',
linkEnabled: true,
target:'_blank',
seperator: '<span class="bn-seperator bn-news-dot"></span>',
errorMsg: 'Json file not loaded. Please check the settings.'
}
});
$('#newsTicker8').breakingNews({
height:56,
borderWidth:0,
background: 'url(img/background-pattern-example.png)'
});
$('#newsTicker9').breakingNews({
effect: 'fade',
themeColor: '#ef7b7b'
});
$('#newsTicker10').breakingNews({
effect: 'slide-down',
themeColor: '#2eb872',
height: 50,
fontSize: '18px'
});
$('#newsTicker11').breakingNews({
effect: 'slide-up'
});
$('#newsTicker12').breakingNews({
effect: 'typography',
direction: 'rtl',
themeColor: '#08c299'
});
$('#newsTicker13').breakingNews({
effect: 'slide-right'
});
$('#newsTicker14').breakingNews();
$('#newsTicker15').breakingNews({
position : 'fixed-bottom',
borderWidth: 3,
height: 50,
themeColor: '#ce2525'
});
});
</script>
</body>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36251023-1']);
_gaq.push(['_setDomainName', 'jqueryscript.net']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</html>