slide to paginate complete

main
psychobunny 10 years ago
parent 995504e364
commit 4216380604

@ -132,14 +132,18 @@ $(document).ready(function() {
placement: 'left'
});
var dragging = false, originalY = 0;
var dragging = false, originalY = 0, toPage = page;
handle.on('mousedown', function(ev) {
dragging = true;
originalY = ev.screenY;
});
$('body').on('mouseup', function() {
dragging = false;
if (dragging === true) {
dragging = false;
ajaxify.go('topic/' + ajaxify.data.slug + '/' + (toPage * config.postsPerPage));
}
//handle.css('margin-top', '0px');
});
@ -149,8 +153,9 @@ $(document).ready(function() {
}
//handle.css('margin-top', (originalY - ev.screenY) + 'px');
var distance = originalY - ev.screenY,
toPage = page - parseInt(distance / 50, 10);
var distance = originalY - ev.screenY;
toPage = page - parseInt(distance / 50, 10);
if (toPage > ajaxify.data.pageCount) {
toPage = ajaxify.data.pageCount;

Loading…
Cancel
Save