diff --git a/lib/persona.js b/lib/persona.js index 3fc5aab..09009c3 100644 --- a/lib/persona.js +++ b/lib/persona.js @@ -1,6 +1,6 @@ "use strict"; -/*globals config, utils, NProgress*/ +/*globals ajaxify, config, utils, NProgress*/ $(document).ready(function() { setupSlideMenu(); @@ -166,8 +166,11 @@ $(document).ready(function() { toPage = 0; } - handle.html(toPage); - + if (parseInt(handle.html(), 10) !== toPage) { + handle.html(toPage); + handle.removeClass('animated'); + setTimeout(function() { handle.addClass('animated');}, 10); + } }); handle.css('left', page / ajaxify.data.pageCount * handle.parents('[component="post"]').width() + 'px'); diff --git a/modules/paginator.less b/modules/paginator.less index 56b918f..2d13516 100644 --- a/modules/paginator.less +++ b/modules/paginator.less @@ -12,6 +12,15 @@ font-size: 11px; .user-select(none); + + &.animated { + -webkit-animation-name: bounceIn; + animation-name: bounceIn; + -webkit-animation-duration: 0.5s; + animation-duration: 0.5s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + } } @media (min-width: @screen-md-min) {