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(function($) { 26 $.fn.layerBoard = function(option) { 27 var elements = this; 28 elements.each(function(){ 29 option = $.extend({ 30 delayTime: 200, //表示ã¾ã§ã®å¾ ã¡æé 31 fadeTime : 500, //表示ã®ãã§ã¼ãæé 32 alpha : 0.5, //ã¬ã¤ã¤ã¼ã®éæåº¦ 33 limitMin : 1, //ä½åçµéå¾ã«å度表示ããã 34 easing: 'linear', //ã¤ã¼ã¸ã³ã° 35 limitCookie : 1 //cookieä¿åæé 36 }, option); 37 var limitSec = option.limitMin * 60; //ç§æ°ã«å¤æ 38 if ($.cookie('layerBoardTime') == null) { 39 /*---------------------------------------- 40 cookieããªãå ´å 41 ----------------------------------------*/ 42 LayerBoardFunc (); 43 //cookieã«ç¾å¨ã®æéãã»ãã 44 var start = new Date(); 45 $.cookie('layerBoardTime', start.getTime(), { expires: option.limitCookie,path: '/' }); 46 } else { 47 /*---------------------------------------- 48 cookieãããå ´å 49 ----------------------------------------*/ 50 //ç¾å¨ã®ããªç§ãåå¾ããç§æ°ã«å¤æ 51 var now = new Date(); 52 secDiff = now.getTime() - $.cookie('layerBoardTime'); 53 secTime = Math.floor( secDiff / 1000); 54 //æå®æéãçµéãã¦ããå ´åã¯ãLayerBoardã表示 55 //cookieãåé¤å¾ãå度cookieã«ç¾å¨ã®ããªç§ãã»ãã 56 if (secTime >= limitSec) { 57 LayerBoardFunc (); 58 $.cookie('layerBoardTime', null, { expires:-1,path: '/' }); 59 var start = new Date(); 60 $.cookie('layerBoardTime', start.getTime(), { expires:option.limitCookie,path: '/' }); 61 } 62 } 63 /*---------------------------------------- 64 表示å¦ç 65 ----------------------------------------*/ 66 function LayerBoardFunc () { 67 $('.layer_board_bg', elements).show().animate({opacity: 0},0).delay(option.delayTime).animate({opacity: option.alpha},option.fadeTime,function(){ 68 $('.layer_board', elements).fadeIn(option.fadeTime); 69 }) 70 } 71 /*---------------------------------------- 72 é表示å¦ç 73 ----------------------------------------*/ 74 $('.layer_board_bg', elements).click(function() { 75 $('.layer_board', elements).fadeOut(option.fadeTime); 76 $(this).fadeOut(option.fadeTime); 77 }); 78 //closeãã¿ã³ã®å ´å 79 $('.btn_close', elements).click(function() { 80 $('.layer_board', elements).fadeOut(option.fadeTime); 81 $('.layer_board_bg', elements).fadeOut(option.fadeTime); 82 }); 83 /*---------------------------------------- 84 ãã¿ã³ã«ãã表示å¦ç 85 ----------------------------------------*/ 86 $('.layer_board_btn').click(function() { 87 $('.layer_board_bg', elements).show().animate({opacity: 0},0).delay(option.delayTime).animate({opacity: option.alpha},option.fadeTime,function(){ 88 $('.layer_board', elements).fadeIn(option.fadeTime); 89 }); 90 }); 91 }); 92 return this; 93 }; 94})( jQuery );
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.