1jQuery(document).ready(function($) { 2 // Solo inicializar carruseles con data-carousel="most-visited" 3 // Esto evita que insur.js lo capture con $('.owl-carousel') 4 var $carousel = $('[data-carousel="most-visited"]'); 5 6 if ($carousel.length) { 7 $carousel.owlCarousel({ 8 loop: true, 9 margin: 20, 10 nav: true, 11 dots: true, 12 autoplay: true, 13 autoplayTimeout: 6000, 14 autoplayHoverPause: true, 15 smartSpeed: 800, 16 navText: [ 17 '<span aria-label="Anterior">â¹</span>', 18 '<span aria-label="Siguiente">âº</span>' 19 ], 20 responsive: { 21 0: { 22 items: 1, 23 margin: 15 24 }, 25 480: { 26 items: 1.5, 27 margin: 15 28 }, 29 768: { 30 items: 2.3, 31 margin: 20 32 }, 33 992: { 34 items: 3.3, 35 margin: 20 36 }, 37 1200: { 38 items: 4.4, 39 margin: 20 40 }, 41 1400: { 42 items: 4.4, 43 margin: 20 44 } 45 } 46 }); 47 48 // Accessibility: keyboard navigation 49 $carousel.on('keydown', '.owl-item', function(e) { 50 if (e.keyCode === 13 || e.keyCode === 32) { 51 $(this).find('a').first().click(); 52 } 53 }); 54 55 $carousel.on('click', '.carousel-item-wrapper', function(e) { 56 if ($(e.target).closest('a').length) { 57 return; 58 } 59 var link = $(this).find('a').first(); 60 if (link.length) { 61 window.location.href = link.attr('href'); 62 } 63 }); 64 65 // Add aria-labels to navigation buttons 66 $carousel.on('initialized.owl.carousel', function() { 67 $carousel.find('.owl-next').attr('aria-label', 'Siguiente'); 68 $carousel.find('.owl-prev').attr('aria-label', 'Anterior'); 69 }); 70 } 71});
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.