1$(document).ready(function(){ 2 3 /****************************************** 4 äºåæºå 5 *******************************************/ 6 7 //ã¿ããã¿ã³ã®æ°ãåå¾ 8 var tabQuantity = $('.tab__button').length; 9 10 //ã¿ãã®é·ãã¨ããã£ã®é·ãã®å·®åãåå¾ 11 //var tabExtraDistance = $('.tab').width() - $('.tabContainer').width(); 12 var tabExtraDistance = '408' - $('.tabContainer').width(); 13 14 /****************************************** 15 ã¹ã©ã¤ãã¼çºå 16 *******************************************/ 17 18 var slider = $('.tabContents').bxSlider({ 19 touchEnabled: false, 20 pager:false, 21 controls:false, 22 onSlideBefore: function($slideElement, oldIndex, newIndex){ 23 //ã¹ã©ã¤ãããæã«é¢æ°ãå¼ã³åºããnewIndexã¯ã¹ã©ã¤ãã¼ã®ç¾å¨å°ã 24 slideChange(newIndex); 25 } 26 }); 27 28 29 /****************************************** 30 ã¹ã©ã¤ãããæã«çºåãã颿°ãã¿ãã®è¡¨ç¤ºèª¿æ´ãè¡ãã 31 *******************************************/ 32 33 function slideChange(newIndex) { 34 35 //ã¯ã©ã¹ãèª¿æ´ 36 $('.tab__button').removeClass('active'); 37 $('.tab > div:nth-child(' + ( newIndex + 1 ) + ')').addClass('active'); 38 var colors = ['#ea6000', '#55b6df', '#87c040', '#f6ac19', '#a59aca']; 39 $('.tab__button').css('background-color','#ffffff'); 40 $('.tab__button.active').css('background-color',colors[newIndex]); 41 42 //ã¹ã¯ãã¼ã«ããã¹ãè·é¢ãåå¾ãã¿ãå ¨ä½ã®é·ã / ( ã¿ãã®åæ° - 1 ) * ã¹ã©ã¤ãã®ç¾å¨å¤ 43 var scrollDestination = ( tabExtraDistance / (tabQuantity - 1) ) * ( newIndex ); 44 45 //ã¹ã¯ãã¼ã«ä½ç½®ã調æ´(ãã®ã¿ãã¾ã§ã¹ã¯ãã¼ã«) 46 $('.tabContainer').animate({ scrollLeft: scrollDestination }, 'slow'); 47 48 } 49 50 /****************************************** 51 ã¿ããã¿ã³ã¯ãªãã¯ã§çºåãã颿° 52 *******************************************/ 53 54 $('.tab__button').on('click',function(e){ 55 56 //ä½çªç®ã®è¦ç´ ããåã£ã¦ã¹ã©ã¤ããç§»åãã 57 var nth = $('.tab__button').index(this); 58 slider.goToSlide(nth); 59 60 //ã¯ãªãã¯ã¤ãã³ããç¡å¹å 61 e.preventDefault(); 62 63 }) 64 65});
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.