1//------------------------------------------------------------------------------ 2// ãããã¯ã¹ã©ã¤ãã¼(横ã¹ã©ã¤ãã¿ã¤ããç¡éã«ã¼ããã¼ã¸ã§ã³) 3// Copyright (C) 2015 FUTUREINN CO., LTD. All Rights Reserved. 4// 5//------------------------------------------------------------------------------ 6 7(function(){ 8var $ = FI.jQuery; 9 10 $(function() { 11 12 if($("#topicsmenu").size() > 0){ 13 14 var $tmenu = $('#topicsmenu .tmenu'); 15 var $r_menu = $('#topicsmenu ul'); 16 var tmulwidth = 0; //liã®æ¨ªå¹ 17 var isAct = true; //ã¹ã©ã¤ãæ©è½ãæå¹ã¨ãããã©ãã 18 var processing = false; //å¦çä¸ãã©ããã®å¤å®ãã©ã°ï¼é£æé²æ¢ç¨ï¼ 19 20 //âãæ¼ããã¨ã 21 $("#forward").click(function(){ 22 if(isAct && !processing){ 23 processing = true; 24 var $first = $r_menu.children('li:first') 25 var $last = $r_menu.children('li:last') 26 var left = $first.width() + parseInt($first.css('margin-left'), 10); 27 //ãªã¹ãã®æå¾ãå é ã«ã³ãã¼ã座æ¨ãä¸ã¤ååãããå¾ãã¢ãã¡ã¼ã·ã§ã³ããã³ãã¼å ãæ¶ã 28 $last.clone().prependTo($r_menu); 29 $tmenu.scrollLeft(left); 30 //å·¦å³ã§è¥å¹²ååé度ãéãã®ã§ã'slow:600'ã«å¯¾ã780ããªç§ã«èª¿æ´ 31 $tmenu.animate({scrollLeft:0-left}, 780,function(){ 32 $last.remove(); 33 processing = false; 34 }); 35 } 36 return false; 37 }); 38 39 //âãæ¼ããã¨ã 40 $("#back").click(function(){ 41 if(isAct && !processing){ 42 processing = true; 43 var $first = $r_menu.children('li:first') 44 var left = $first.width() + parseInt($first.css('margin-left'), 10); 45 //ãªã¹ãã®å é ãæå¾ã«ã³ãã¼ããã¢ãã¡ã¼ã·ã§ã³ããå¾ãã³ãã¼å ãæ¶ãã¦åº§æ¨ããªã»ãã 46 $r_menu.children('li:first').clone().appendTo($r_menu); 47 $tmenu.animate({scrollLeft:left}, 'slow',function(){ 48 $first.remove(); 49 $tmenu.scrollLeft(0-left); 50 processing = false; 51 }); 52 } 53 return false; 54 }); 55 56 function judgeSlide(){ 57 //ã¹ã¯ãã¼ã«ããªãã¦ãliã®å 容ãå ¨é¨è¦ãã¦ããå ´åãã¹ã¯ãã¼ã«ãããå¿ è¦ã¯ãªãã®ã§ãæ©è½OFF 58 if(tmulwidth <= $tmenu.width()){ 59 isAct = false; 60 }else{ 61 isAct = true; 62 } 63 } 64 65 //------------------------------------------------------------ 66 // ã¦ã¤ã³ãã¦ãªãµã¤ãºæãæ©è½ãOFFã«ãããã©ãããå¤å®ãã 67 //------------------------------------------------------------ 68 var timer = false; 69 $(window).resize(function() { 70 if (timer !== false) { 71 clearTimeout(timer); 72 } 73 timer = setTimeout(function() { 74 judgeSlide(); 75 clearTimeout(timer); 76 }, 200); 77 }); 78 79 //------------------------------------------------------------ 80 // åæå¦ç 81 //------------------------------------------------------------ 82 //表示ã¹ã¿ã¤ã«ã®è£æ£ 83 $tmenu.css( 'overflow', 'hidden'); 84 $r_menu.children('li').each(function(){ 85 tmulwidth = tmulwidth + $(this).width() + parseInt($(this).css('margin-right'), 10); 86 }); 87 $('#topicsmenu ul').css( 'width', tmulwidth*2); 88 89 //æ¨ªå¹ ã®å¤å® 90 judgeSlide() 91 92 } 93 94 }); 95 96})();
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.