1/* 2 * =================================================================== 3 * jquery.layerBoard.js 4 * @auther:kiyoty 5 * @URI:http://www.idea-clippin.com 6 * @create:2012/12/30 7 * @License:MIT License(X11 LicenseãX License) 8 * =================================================================== 9 * 10 * ------------------------------------------------------------------- 11 * opition 12 * ------------------------------------------------------------------- 13 * delayTime //表示ã¾ã§ã®å¾ ã¡æé 14 * fadeTime //表示ã®ãã§ã¼ãæé 15 * alpha //ã¬ã¤ã¤ã¼ã®éæåº¦ 16 * limitMin //ä½åçµéå¾ã«å度表示ããã 17 * easing //ã¤ã¼ã¸ã³ã° 18 * limitCookie //cookieä¿åæé 19 * 20 * ------------------------------------------------------------------- 21 * Example 22 * $('#layer_board_area').layerBoard({alpha:0.5}); 23 * ------------------------------------------------------------------- 24*/ 25 26(function($) { 27 28 $.fn.layerBoard = function(option) { 29 30 var elements = this; 31 32 elements.each(function(){ 33 34 option = $.extend({ 35 delayTime: 50, //表示ã¾ã§ã®å¾ ã¡æé 36 fadeTime : 500, //表示ã®ãã§ã¼ãæé 37 alpha : 0.5, //ã¬ã¤ã¤ã¼ã®éæåº¦ 38 39 limitMin : 0, //ä½åçµéå¾ã«å度表示ããã(ããã©ã«ãï¼1) 40 41 easing: 'linear', //ã¤ã¼ã¸ã³ã° 42 43 limitCookie : 0 //cookieä¿åæé(ããã©ã«ãï¼1) 44 }, option); 45 46 47 var limitSec = option.limitMin * 60; //ç§æ°ã«å¤æ 48 49 50 if ($.cookie('layerBoardTime') == null) { 51 52 /*---------------------------------------- 53 cookieããªãå ´å 54 ----------------------------------------*/ 55 LayerBoardFunc (); 56 57 //cookieã«ç¾å¨ã®æéãã»ãã 58 var start = new Date(); 59 $.cookie('layerBoardTime', start.getTime(), { expires: option.limitCookie,path: '/' }); 60 61 62 } else { 63 64 /*---------------------------------------- 65 cookieãããå ´å 66 ----------------------------------------*/ 67 68 //ç¾å¨ã®ããªç§ãåå¾ããç§æ°ã«å¤æ 69 var now = new Date(); 70 secDiff = now.getTime() - $.cookie('layerBoardTime'); 71 secTime = Math.floor( secDiff / 1000); 72 73 74 //æå®æéãçµéãã¦ããå ´åã¯ãLayerBoardã表示 75 //cookieãåé¤å¾ãå度cookieã«ç¾å¨ã®ããªç§ãã»ãã 76 if (secTime >= limitSec) { 77 78 LayerBoardFunc (); 79 80 $.cookie('layerBoardTime', null, { expires:-1,path: '/' }); 81 82 var start = new Date(); 83 $.cookie('layerBoardTime', start.getTime(), { expires:option.limitCookie,path: '/' }); 84 85 } 86 87 } 88 89 90 /*---------------------------------------- 91 表示å¦ç 92 ----------------------------------------*/ 93 function LayerBoardFunc () { 94 95 96 $('.layer_board_bg', elements).show().animate({opacity: 0},0).delay(option.delayTime).animate({opacity: option.alpha},option.fadeTime,function(){ 97 $('.layer_board', elements).fadeIn(option.fadeTime); 98 }) 99 100 } 101 102 103 /*---------------------------------------- 104 é表示å¦ç 105 ----------------------------------------*/ 106 $('.layer_board_bg', elements).click(function() { 107 108 $('.layer_board', elements).fadeOut(option.fadeTime); 109 $(this).fadeOut(option.fadeTime); 110 111 112 }); 113 114 115 //closeãã¿ã³ã®å ´å 116 $('.btn_close', elements).click(function() { 117 118 $('.layer_board', elements).fadeOut(option.fadeTime); 119 $('.layer_board_bg', elements).fadeOut(option.fadeTime); 120 121 122 }); 123 124 125 126 /*---------------------------------------- 127 ãã¿ã³ã«ãã表示å¦ç 128 ----------------------------------------*/ 129 $('.layer_board_btn').click(function() { 130 131 $('.layer_board_bg', elements).show().animate({opacity: 0},0).delay(option.delayTime).animate({opacity: option.alpha},option.fadeTime,function(){ 132 $('.layer_board', elements).fadeIn(option.fadeTime); 133 }); 134 135 }); 136 137 }); 138 139 return this; 140 141 }; 142 143})( jQuery ); 144 145
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.