// Use an IIFE (Immediately Invoked Function Expression) to avoid global scope pollution
(function() {
// Scope variables to the specific section to avoid conflicts with plentymarkets
const section = document.querySelector('.animalixs-category-section');
if (!section) return;
// Add smooth scroll indicator for mobile
const categoryScroll = section.querySelector('#categoryScroll');
const scrollHint = section.querySelector('#scrollHint');
if (!categoryScroll) return;
// Track scroll position for visual feedback
function checkScrollPosition() {
const scrollLeft = categoryScroll.scrollLeft;
const scrollWidth = categoryScroll.scrollWidth;
const clientWidth = categoryScroll.clientWidth;
// Show hint if there is more content to scroll to the right
// (adding a small 2px buffer for rounding errors)
if (scrollWidth - clientWidth - scrollLeft > 2 && scrollLeft < 20) {
if(scrollHint) scrollHint.classList.remove('hidden');
} else {
if(scrollHint) scrollHint.classList.add('hidden');
}
}
categoryScroll.addEventListener('scroll', checkScrollPosition);
// Also check on window resize
window.addEventListener('resize', checkScrollPosition);
// Mobile-specific: Add touch scroll hint for first load
window.addEventListener('load', function() {
checkScrollPosition(); // Check initially on load
// Removed the window.innerWidth <= 768 check so it animates on all devices
categoryScroll.style.animation = 'pulse-scroll 2s ease-in-out';
});
// Add keyboard navigation support (only when mouse is over the container)
section.addEventListener('mouseenter', function() {
document.addEventListener('keydown', handleKeydown);
});
section.addEventListener('mouseleave', function() {
document.removeEventListener('keydown', handleKeydown);
});
function handleKeydown(e) {
if (e.key === 'ArrowLeft') {
categoryScroll.scrollBy({ left: -100, behavior: 'smooth' });
} else if (e.key === 'ArrowRight') {
categoryScroll.scrollBy({ left: 100, behavior: 'smooth' });
}
}
// Dynamically inject the keyframes animation to ensure isolation
const styleId = 'animalixs-category-animations';
if (!document.getElementById(styleId)) {
const styleEl = document.createElement('style');
styleEl.id = styleId;
styleEl.textContent = `
@keyframes pulse-scroll {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
`;
document.head.appendChild(styleEl);
}
})();
Artikelbewertung
Anwendungsbereich
- Artikelpaket[Paket] MEDITERRANEO Salzleckstein, Set mit 2x 3kg10,06 £ *6 Kilogramm | 1,68 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] MEDITERRANEO Salzleckstein, Set mit 4x 3kg20,81 £ *12 Kilogramm | 1,73 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Lolly-Lick, Kamille, 750g7,81 £ *750 Gramm | 10,41 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] Lolly-Lick, 2er Set Leckstein, Kamille, inkl. Aufhängseil, 2x750g14,74 £ *1500 Gramm | 9,83 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Lolly-Lick, Vitamin Booster mit Hagebutte, 750g7,81 £ *750 Gramm | 10,41 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] Lolly-Lick Leckstein, 2er Set, Hagebutte, inkl. Aufhängseil, 2x750g14,74 £ *1500 Gramm | 9,83 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Lolly-Lick, Stressless mit Lavendel, 750g7,81 £ *750 Gramm | 10,41 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] Lolly-Lick Leckstein, 2er Set, Lavendel, inkl. Aufhängseil, 2x750g14,74 £ *1500 Gramm | 9,83 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Lolly-Lick, mit Minze + Eukalyptus, 750g7,81 £ *750 Gramm | 10,41 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] Lolly.Lick Leckstein im 2er Set, Mint, mit Aufhängseil, 2x750g14,74 £ *1500 Gramm | 9,83 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Lolly-Lick, Apfel, 750g7,37 £ *750 Gramm | 9,83 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] Lolly-Lick Leckstein, 2er Set, Apfel, inkl. Aufhängseil, 2x750g13,88 £ *1500 Gramm | 9,25 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Lolly-Lick, Vanille-Banane, 750g7,37 £ *750 Gramm | 9,83 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] Lolly-Lick Leckstein, 2er Set, Vanille-Banane, inkl. Aufhängseil, 2x750g13,88 £ *1500 Gramm | 9,25 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] ANTI-STONE Mineralleckstein, Set mit 4x 5kg41,63 £ *20 Kilogramm | 2,08 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] MOLASSES PLUS Mineralleckstein, Set mit 4x 5kg34,69 £ *20 Kilogramm | 1,73 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Artikelpaket[Paket] CALCIBLOCK Mineralleckstein, Set mit 4x 5kg32,96 £ *20 Kilogramm | 1,65 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten
- Neuheit[Paket] Anti-Stress Plus Mineralleckstein für Schweine – Stress reduzieren & Beschäftigung | 4x5kg82,39 £ *20000 Gramm | 4,12 £ / Kilogramm* inkl. ges. MwSt. zzgl. Versandkosten