X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0ee9de179914aa395f4b7475b7b9b6229c42b760..f670db2a0f9a08e834e89a3f0b76208b9be6c795:/wolnelektury/static/js/catalogue.js diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js index 076ae4eeb..31bad6eac 100644 --- a/wolnelektury/static/js/catalogue.js +++ b/wolnelektury/static/js/catalogue.js @@ -447,6 +447,20 @@ function serverTime() { return false; }); - $('marquee').marquee() + $('marquee').marquee().mouseover(function () { + $(this).trigger('stop'); + }).mouseout(function () { + $(this).trigger('start'); + $(this).data('drag', false); + }).mousemove(function (event) { + if ($(this).data('drag') == true) { + this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX); + } + }).mousedown(function (event) { + $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft); + }).mouseup(function () { + $(this).data('drag', false); + }); + }); })(jQuery)