1jQuery(function ($) { 2 let isDragging = false; 3 let dragStartX = 0; 4 let clickTarget = null; 5 6 $('.dragscroll').each(function () { 7 const $container = $(this); 8 9 $container.on('mousedown', function (e) { 10 isDragging = false; 11 dragStartX = e.pageX; 12 clickTarget = $(e.target).closest('a.js-image-slider-link'); // Merke dir das Ziel, falls es ein Link ist 13 }); 14 15 $container.on('mousemove', function (e) { 16 if (Math.abs(e.pageX - dragStartX) > 5) { 17 isDragging = true; 18 } 19 }); 20 21 $container.on('mouseup', function (e) { 22 if (!isDragging && clickTarget) { 23 clickTarget.trigger(clickTarget.data('gallery-id')); 24 } 25 isDragging = false; 26 clickTarget = null; 27 }); 28 29 $container.find('a').off('click').on('click', function (e) { 30 e.preventDefault(); 31 e.stopImmediatePropagation(); 32 return false; 33 }); 34 }); 35});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.