1$(function(){ 2 3 var $win = $(window); 4 var $popBox = $('#popBox'); 5 var $popBtn = $popBox.find('.pop_btn'); 6 7 var monitor = checkBrowser(); 8 var ieStat = window.applicationCache; 9 var pcStat = ( monitor.device == "pc" ) ? true : false; 10 var action = "click"; 11 12 var initStat = true; // ååå®è¡ã¹ãã¼ã¿ã¹ 13 var openStat = false; // 表示ã¹ãã¼ã¿ã¹ 14 var chgStat = false; // Scrollç¨ã¹ãã¼ã¿ã¹ 15 var saveStat = false; // Scrollç¨ã¹ãã¼ã¿ã¹ 16 var sizeStat = false; // Resizeç¨ã¹ãã¼ã¿ã¹ 17 var saveSize = false; // Resizeç¨ã¹ãã¼ã¿ã¹ 18 19 var spWidth = 768; // SPåæ¿ããµã¤ãº 20 var popSp = 150; // ã¢ãã¡ã¼ã·ã§ã³ã¹ãã¼ã 21 22 var sc = {}; 23 24 var $target, tarPos, mvSet1, mvSet2; 25 26 var timer = false; 27 var winWidth = $(window).width(); 28 var winWidth_resized; 29 30 31 32 33 //********************************************************************* 34 // 35 // ã¿ã¼ã²ããã¨ãªãè¦ç´ ãæå® 36 // 37 //********************************************************************* 38 $target = $('#main_detail').find('.ex_box'); 39 40 41 //********************************************************************* 42 // 43 // åæè¨å® 44 // 45 //********************************************************************* 46 $(window).load(function() { 47 48 onResize(); 49 //onScroll(); 50 51 $win.resize(onResize); 52 //$win.scroll(onScroll); 53 54 // åæä½ç½® // 55 if( sc.w <= spWidth ){ 56 mvSet1 = -($popBox.outerHeight(true)); 57 mvSet2 = 0; 58 }else{ 59 mvSet1 = -($popBox.outerHeight(true)-52); 60 mvSet2 = -($popBox.outerWidth(true)-144); 61 } 62 $popBox.css({ display:'block', bottom:mvSet1+'px', right:mvSet2+'px' }); 63 64 65 var winW = window.innerWidth ? window.innerWidth: $(window).width(); 66 var txt = "è³¼å ¥ã¯ãã¡ã"; 67 68 if(winW <= spWidth) { 69 txt = "è³¼å ¥ãã"; 70 } 71 72 $popBtn.find('span').text(txt); 73 74 75 }); 76 77 78 //********************************************************************* 79 // 80 // POPUP BUTTON 81 // 82 //********************************************************************* 83 $popBtn.bind(action,function(e){ 84 85 if(!$(this).hasClass("anc")){ 86 // éãã¦ãå ´åï¼OPEN // 87 if( !openStat ){ 88 boxOn(); 89 90 // éãã¦ããå ´åï¼CLOSE // 91 }else{ 92 boxOff(); 93 } 94 } 95 96 97 }); 98 99 // OPEN // 100 function boxOn(){ 101 102 mvSet1 = 0; 103 mvSet2 = 0; 104 $popBox.removeClass('close'); 105 $popBtn.find('span').text("éãã"); 106 107 // Animation // 108 $popBox.stop().animate({ bottom:mvSet1+'px', right:mvSet2+'px' },{duration:popSp}); 109 openStat = true; 110 } 111 112 // CLOSE // 113 function boxOff(){ 114 115 if( sc.w <= spWidth ){ 116 mvSet1 = -($popBox.outerHeight(true)); 117 mvSet2 = 0; 118 }else{ 119 mvSet1 = -($popBox.outerHeight(true)-52); 120 mvSet2 = -($popBox.outerWidth(true)-144); 121 } 122 123 var winW = window.innerWidth ? window.innerWidth: $(window).width(); 124 var txt = "è²·ãç©ããã¸"; 125 126 if(winW <= spWidth) { 127 txt = "ããã¸"; 128 } 129 130 $popBox.addClass('close'); 131 $popBtn.find('span').text(txt); 132 133 // Animation // 134 $popBox.stop().animate({ bottom:mvSet1+'px', right:mvSet2+'px' },{duration:popSp}); 135 openStat = false; 136 } 137 138 139 //********************************************************************* 140 // 141 // å種 EVENT è¨å® 142 // 143 //********************************************************************* 144 145 //-------------------------------------------- 146 // Resize Event 147 //-------------------------------------------- 148 function onResize(){ 149 150 if (timer !== false) { 151 clearTimeout(timer); 152 } 153 154 timer = setTimeout(function() { 155 // ãªãµã¤ãºå¾ã®ã¦ã¤ã³ãã¦ã®æ¨ªå¹ ãåå¾ 156 winWidth_resized = $(window).width(); 157 158 // ãªãµã¤ãºåã®ã¦ã¤ã³ãã¦å¹ ã¨ãªãµã¤ãºå¾ã®ã¦ã¤ã³ãã¦å¹ ãç°ãªãå ´å 159 if ( winWidth != winWidth_resized ) { 160 // ããã«ããããå¦çæ¸ã 161 // CLOSE // 162 if( initStat ){ 163 initStat = false; 164 }else{ 165 boxOff(); 166 } 167 168 // 次å以é使ããããã«ãªãµã¤ãºå¾ã®å¹ ãã¦ã¤ã³ãã¦å¹ ã«è¨å®ãã 169 winWidth = $(window).width(); 170 } 171 }, 200); 172 173 //alert("e"); 174 175 sc.w = $win.width(); 176 sc.h = $win.height(); 177 178 // ã¿ã¼ã²ããã®ããªã¬ã¼ä½ç½®åå¾ï¼ã¹ã¯ãã¼ã«ã¤ãã³ãã«å¿ è¦ï¼ // 179 //tarPos = $target.offset().top + $target.outerHeight(true); 180 181 } 182 183 //-------------------------------------------- 184 // Scroll Event 185 //-------------------------------------------- 186 function onScroll(){ 187 188 sc.scroll = $(this).scrollTop(); 189 if( sc.scroll < tarPos ){ 190 chgStat = false; 191 }else{ 192 chgStat = true; 193 } 194 195 if( saveStat != chgStat ){ 196 if( chgStat ) { 197 boxOn(); 198 }else{ 199 boxOff(); 200 } 201 saveStat = chgStat; 202 } 203 } 204 205});
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.