Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */ mw.loader.using('jquery', function () { $(function () { const carousel = document.querySelector('.card-carousel'); if (!carousel) return; let isDragging = false; let startX; let scrollStart; carousel.addEventListener("pointerdown", function (e) { isDragging = true; carousel.classList.add("dragging"); startX = e.pageX; scrollStart = carousel.scrollLeft; carousel.setPointerCapture(e.pointerId); e.preventDefault(); }); carousel.addEventListener("pointermove", function (e) { if (!isDragging) return; const x = e.pageX; const walk = (x - startX) * 1.5; // Adjust scroll speed if desired carousel.scrollLeft = scrollStart - walk; e.preventDefault(); }); carousel.addEventListener("pointerup", function () { isDragging = false; carousel.classList.remove("dragging"); }); carousel.addEventListener("pointerleave", function () { isDragging = false; carousel.classList.remove("dragging"); }); }); });