1/* 2 dipro-common.js 3 dipro æä¾ script 4------------------------------------------------------------------------ */ 5$(function(){ 6 7 var widW = window.innerWidth; 8 var widSP = 600 + 1; 9 10 /* 11 tabMenu 12 ------------------------------------------------------------ */ 13 function tabMenu() { 14 $('[data-tabMenu]').each(function() { 15 var $root = $(this) 16 // _ navsWrap vars 17 var navsWrap = $root.find('[data-tabMenu-navsWrap]') 18 , navs = $root.find('[data-tabMenu-navs]') 19 , nav = $(navs).children(); 20 // _ panels vars 21 var panels = $root.find('[data-tabMenu-panels]') 22 , panel = $(panels).children(); 23 24 $(navs).find('a[href^="#"]').on('click', function(e) { 25 e.preventDefault(); 26 var navA = $(this) 27 , target = $(this).attr('href'); 28 29 setTimeout(function(){ 30 31 if (! $(target).length) return false; 32 $(navA).closest('[data-tabMenu-navs]').children().removeClass('isCuurent'); 33 $(navA).parent().addClass('isCuurent'); 34 $root.find(target).closest('[data-tabMenu-panels]').children().removeClass('isCuurent'); 35 $root.find(target).addClass('isCuurent'); 36 },50); 37 }); 38 }); 39 }; 40 tabMenu(); 41 42 /* 43 accordMenu 44 ------------------------------------------------------------ */ 45 // default 46 function accordMenu() { 47 $('[data-accordMenu-body]').attr('style', ''); 48 $('[data-accordMenu]').each(function() { 49 var $root = $(this); 50 var $btns = $root.find('[data-accordMenu-btns]'); 51 var $btnsClose = $root.find('[data-accordMenu-close]'); 52 var $body = $root.find('[data-accordMenu-body]'); 53 var $btnsOpen = $('[data-accordMenu-btns="open"]'); 54 55 $body.hide(); 56 $('.accordMenu_btns-isOpen').next($body).show(); 57 58 $btns.click(function(){ 59 // $(this).attr('data-accordMenu-btns', 'open'); 60 $(this).next($body).slideToggle(); 61 $(this).toggleClass('accordMenu_btns-isOpen'); 62 return false; 63 }); 64 65 $btnsClose.click(function () { 66 $(this).parent().slideToggle(); 67 $(this).parent().prev($btns).removeClass('accordMenu_btns-isOpen'); 68 $(this).parent().next($btns); 69 }); 70 71 }); 72 }; 73 accordMenu(); 74 75 /* 76 colorbox 77 ------------------------------------------------------------ */ 78 // colorboxå ã§youtube表示 79 $('.cboxYtMovie').css({ 80 'cursor' : 'pointer', 81 }) 82 $(window).on('load resizeend', function(){ 83 var windowW = window.innerWidth; 84 var windowH = window.innerHeight; 85 var w_size = windowW * 0.9; 86 var h_size = windowH * 0.9; 87 var cboxH = $('#cboxContent').innerHeight; 88 89 if (win.device == 'sp') { 90 $('.cboxYtMovie').colorbox({ 91 iframe: true, 92 innerWidth: w_size, 93 innerHeight: h_size, 94 maxWidth: '100%', 95 maxHeight: '75%', 96 onComplete: function() { 97 setTimeout(function(){ 98 $.colorbox.position(0); 99 },500); 100 } 101 }); 102 $.colorbox.resize({ 103 innerWidth: w_size, 104 innerHeight: h_size, 105 }); 106 } else { 107 $('.cboxYtMovie').colorbox({ 108 // inline: true, 109 iframe: true, 110 innerWidth: '1000px', 111 innerHeight: '563px', 112 maxWidth: '100%', 113 maxHeight: '100%', 114 }); 115 $.colorbox.resize({ 116 innerWidth: '1000px', 117 innerHeight: '563px', 118 }); 119 }; 120 }); 121 122 // colorboxå ã§Jã¹ããªã¼ã åç»è¡¨ç¤º 123 $('.js-cb-jstream-inline').colorbox({ 124 inline: true, 125 closeButton: true, 126 maxWidth: '90%', 127 maxHeight: '90%', 128 opacity: 0.9, 129 onComplete: function() { 130 setTimeout(function(){ 131 $.colorbox.position(0); 132 },500); 133 } 134 }); 135 if($('.js-cb-jstream-inline').length){ 136 $(window).trigger('resize'); 137 }; 138 139 // 表示ãµã¤ãº : 1.5å 140 $(window).on('load resizeend', function(){ 141 var windowW = window.innerWidth; 142 var windowH = window.innerHeight; 143 var w_size = windowW * 0.9; 144 var h_size = windowH * 0.9; 145 var cboxH = $('#cboxContent').innerHeight; 146 147 if (win.device == 'sp') { 148 $('.js-cb-jstream-inlineView15').colorbox({ 149 inline: true, 150 closeButton: true, 151 innerWidth: w_size, 152 innerHeight: h_size, 153 maxWidth: '90%', 154 maxHeight: '90%', 155 onComplete: function() { 156 setTimeout(function(){ 157 $.colorbox.position(0); 158 },500); 159 } 160 }); 161 $.colorbox.resize({ 162 innerWidth: w_size, 163 innerHeight: h_size, 164 }); 165 } else { 166 $('.js-cb-jstream-inlineView15').colorbox({ 167 inline: true, 168 closeButton: true, 169 innerWidth: '1000px', 170 innerHeight: '563px', 171 maxWidth: '100%', 172 maxHeight: '100%', 173 }); 174 $.colorbox.resize({ 175 innerWidth: '1000px', 176 innerHeight: '563px', 177 }); 178 }; 179 }); 180 181 /* 182 popupvideo 183 ------------------------------------------------------------ */ 184 $('.pv_poster').colorbox({ 185 onComplete: function () { 186 setTimeout(function () { 187 $.colorbox.position(0); 188 }, 500); 189 } 190 }); 191 $(document).bind('cbox_open', function(){ 192 $.pv_init(); 193 $(".pv_poster").pv_player(); 194 }); 195 $(document).bind('cbox_closed', function(){ 196 $("video#pv_player")[0].pause(); 197 }); 198 $("video#pv_player").click(function(){ 199 $(window).trigger('resize'); 200 }); 201 if($('.pv_poster').length){ 202 $(window).trigger('resize'); 203 // $(window).resize(function(){ 204 // $(window).trigger('resize'); 205 // // alert('resize'); 206 // }); 207 }; 208 209 // 表示ãµã¤ãº : 1.5å 210 $('.pv_poster').on('click', function(){ 211 if ($(this).hasClass('pv-videoView15')) { 212 $(document).bind('cbox_open', function(){ 213 var i = '960' , p = '540' 214 $('#cboxContent , #cboxLoadedContent , video').css({ 215 'width' : i ,
216 'height' : p 217 }) 218 }); 219 } else { 220 $(document).bind('cbox_open', function(){ 221 var i = '640' , p = '360' 222 $('#cboxContent , #cboxLoadedContent , video').css({ 223 'width' : i , 224 'height' : p 225 }) 226 }); 227 } 228 }); 229 230}); 231
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.