Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Daron
panikweb
Commits
74b81892
Commit
74b81892
authored
Sep 24, 2013
by
fred
Browse files
newsroll: stop auto update once the user clicked on a newsitem
parent
9002c2b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
panikweb_templates/templates/news/roll.html
View file @
74b81892
...
...
@@ -35,17 +35,19 @@
<script>
$
(
function
()
{
$
(
'
#ticker li:not(:first)
'
);
var
ticker_interval
;
function
tick
(){
$
(
'
#ticker li:first
'
).
animate
({
'
opacity
'
:
0
},
200
,
function
()
{
$
(
this
).
appendTo
(
$
(
'
#ticker
'
)).
css
(
'
opacity
'
,
1
);
});
}
$
(
"
#roller button
"
).
on
(
'
click
'
,
function
(
e
){
clearInterval
(
ticker_interval
);
e
.
preventDefault
();
$
(
$
(
this
).
attr
(
'
data-about
'
)).
prependTo
(
'
#ticker
'
);
return
false
;
});
setInterval
(
function
(){
tick
();
},
5000
);
/**/
ticker_interval
=
setInterval
(
function
(){
tick
();
},
5000
);
/**/
});
</script>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment