1function create_jcarousel(id){ 2 var ID = '#'+id; 3 jQuery.noConflict(); 4 jQuery(document).ready(function($) { 5 6 $(function() { 7 8 var jcarousel = $(ID + ' .jcarousel'); 9 10 jcarousel 11 12 .on('jcarousel:reload jcarousel:create', function () { 13 14 var width = jcarousel.innerWidth(); 15 16 if (width >= 1100) { 17 18 width = width / 8; 19 20 } else if (width >= 992) { 21 22 width = width / 6; 23 24 } else if (width >= 768) { 25 26 width = width / 5; 27 28 } else if (width >= 600) { 29 30 width = width / 4; 31 32 } else if (width >= 480) { 33 34 width = width / 3; 35 36 }else if (width >= 320) { 37 38 width = width / 2; 39 40 }else if (width < 320) { 41 42 width = width / 1; 43 } 44 45 jcarousel.jcarousel('items').css('width', width + 'px'); 46 }) 47 48 .jcarousel({ 49 50 wrap: 'circular', 51 rtl: false 52 53 }); 54 55 $(ID + ' .jcarousel-control-prev') 56 57 .jcarouselControl({ 58 59 target: '-=1' 60 61 }); 62 63 $(ID + ' .jcarousel-control-next') 64 65 .jcarouselControl({ 66 67 target: '+=1' 68 69 }); 70 71 72 $(ID + ' .jcarousel-pagination') 73 74 .on('jcarouselpagination:active', 'a', function() { 75 76 $(this).addClass('active'); 77 78 }) 79 80 .on('jcarouselpagination:inactive', 'a', function() { 81 82 $(this).removeClass('active'); 83 84 }) 85 86 .on('click', function(e) { 87 88 e.preventDefault(); 89 90 }) 91 92 .jcarouselPagination({ 93 94 perPage: 1, 95 96 item: function(page) { 97 98 return '<a href="#' + page + '">' + page + '</a>'; 99 100 } 101 102 }); 103 $(ID + ' .jcarousel').jcarouselAutoscroll({ 104 105 interval: 2500, 106 107 create: $(ID + ' .jcarousel').hover(function(){ 108 $(this).jcarouselAutoscroll('stop'); 109 }, 110 function(){ 111 $(this).jcarouselAutoscroll('start'); 112 }) 113 }); 114 115 }); 116 117 }); 118}
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.