1jQuery(document).ready(function($){ 2 3 var arrow; 4 5 if( $(window).width()>960 ){ //desktop 6 arrow = 'M 53.5834 11.8515 C 51.4747 9.7428 48.0565 9.7428 45.9478 11.8515 L 11.5822 46.2144 C 9.4735 48.3258 9.4735 51.744 11.5822 53.8527 L 45.9478 88.2184 C 48.0565 90.327 51.4747 90.327 53.5834 88.2184 C 55.6921 86.1096 55.6921 82.6888 53.5834 80.58 L 28.441 55.4329 L 81.55 55.435 L 81.55 44.635 L 28.441 44.6329 L 53.5834 19.4872 C 55.5811 17.4894 55.6863 14.3164 53.8989 12.195 Z'; 7 } else { //mobile 8 arrow = 'M 25.5346 52.5651 C 24.0218 51.0378 24.0218 48.5622 25.5346 47.033 L 50.1878 22.1454 C 51.7005 20.6182 54.1527 20.6182 55.6654 22.1454 C 57.1782 23.6727 57.1782 26.1483 55.6654 27.6756 L 33.753 49.8 L 55.6654 71.9225 C 57.1782 73.4497 57.1782 75.9273 55.6654 77.4546 C 54.1527 78.9818 51.7005 78.9818 50.1878 77.4546 L 25.5346 52.5651 Z'; 9 } 10 11 $('.CASE-STUDIES .b-columns.alt-flickity').each(function(){ 12 var flickity = $(this).flickity({ 13 contain: true, 14 cellAlign: 'left', 15 wrapAround: true, 16 cellSelector: '.b-column', 17 groupCells: true, 18 prevNextButtons: true, 19 pageDots: false, 20 arrowShape: arrow, 21 }); 22 }); 23 24 25 //accessibility 26 27 //hide slides if not visible & remove tabbing on links/buttons 28 29 //default 30 $('.CASE-STUDIES .b-columns.alt-flickity .b-column').each(function(){ 31 if(!$(this).hasClass('is-selected')){ 32 $(this).attr('aria-hidden', true); 33 $(this).find('a').attr('tabindex', '-1'); 34 } 35 }); 36 37 //on slide change 38 $('.CASE-STUDIES .b-columns.alt-flickity').on( 'change.flickity', function( event, index ) { 39 $('.CASE-STUDIES .b-columns.alt-flickity .b-column').each(function(){ 40 if(!$(this).hasClass('is-selected')){ 41 $(this).attr('aria-hidden', true); 42 $(this).find('a').attr('tabindex', '-1'); 43 } else { 44 $(this).attr('aria-hidden', false); 45 $(this).find('a').attr('tabindex', '0'); 46 } 47 }); 48 }); 49 50 //change tabbing order 51 // $(window).on('keyup', function(event){ 52 // if(event.keyCode == 9 && !event.shiftKey){ 53 // if($('.CASE-STUDIES .b-columns.alt-flickity').is(':focus')) { 54 // $('.CASE-STUDIES .b-columns.alt-flickity .flickity-button.previous').attr('tabindex', '1'); 55 // } else if($('.CASE-STUDIES .b-columns.alt-flickity .flickity-button.previous').is(':focus')){ 56 // $('.CASE-STUDIES .b-columns.alt-flickity .flickity-button.next').attr('tabindex', '-1'); 57 // } else if($('.CASE-STUDIES .b-columns.alt-flickity .is-selected .b-button').is(':focus')){ 58 // $('.CASE-STUDIES .b-columns.alt-flickity .flickity-button.previous').attr('tabindex', '-1'); 59 // $('.CASE-STUDIES .b-columns.alt-flickity .flickity-button.next').attr('tabindex', '0'); 60 // } 61 // } else if(event.shiftKey && event.keyCode == 9){ 62 // if($('.CASE-STUDIES .b-columns.alt-flickity .flickity-button.next').is(':focus')){ 63 // $('.CASE-STUDIES .b-columns.alt-flickity .flickity-button.previous').attr('tabindex', '0'); 64 // } else if($('.CASE-STUDIES .b-columns.alt-flickity .is-selected .b-button').is(':focus')){ 65 // $('.CASE-STUDIES .b-columns.alt-flickity .flickity-button.previous').attr('tabindex', '0'); 66 // } 67 // } 68 // }); 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.