diff options
Diffstat (limited to 'client')
| -rw-r--r-- | client/button.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/client/button.js b/client/button.js index f1f9123..476fc04 100644 --- a/client/button.js +++ b/client/button.js @@ -1,11 +1,15 @@ -$(document).ready(function () { - if (window.location.pathname == '/') { +Router.onRun(function () { + $(document).ready(function () { + if (window.logoInterval !== undefined) + clearInterval(window.logoInterval); + var i = 0; - setInterval(function() { + window.logoInterval = setInterval(function() { $('img.home-logo').attr('src', '/img/icons/1_' + ((++i%5)+1) + '.gif'); }, 2000); - } -}); + }); + this.next(); +}, { only: ['login'] }); function prepareDates() { var month = $('input[name=month]').val(); |
