1(function ($) { 2 Drupal.behaviors.shelterFeaturedDocs = { 3 attach: function (context, settings) { 4 $('.featured-document-slider', context).each(function() { 5 let element = $(this); 6 7 element.on('jcarousel:create jcarousel:reload', function() { 8 let width = $(this).innerWidth(); 9 $(this).jcarousel('items').css('width', width + 'px'); 10 }); 11 12 // Initialize and set autoscroll. 13 element.jcarousel().jcarouselAutoscroll({ 14 interval: 5000 15 }); 16 17 $('.jcarousel-control-prev', element) 18 .on('jcarouselcontrol:active', function() { 19 $(this).removeClass('inactive'); 20 }) 21 .on('jcarouselcontrol:inactive', function() { 22 $(this).addClass('inactive'); 23 }) 24 .jcarouselControl({ 25 target: '-=1' 26 }); 27 28 $('.jcarousel-control-next', element) 29 .on('jcarouselcontrol:active', function() { 30 $(this).removeClass('inactive'); 31 }) 32 .on('jcarouselcontrol:inactive', function() { 33 $(this).addClass('inactive'); 34 }) 35 .jcarouselControl({ 36 target: '+=1' 37 }); 38 39 $('.jcarousel-pagination', element) 40 .on('jcarouselpagination:active', 'a', function() { 41 $(this).addClass('active'); 42 }) 43 .on('jcarouselpagination:inactive', 'a', function() { 44 $(this).removeClass('active'); 45 }) 46 .jcarouselPagination(); 47 }); 48 } 49 }; 50})(jQuery);
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.