1/* Google Map 2-------------------------------------------------------------------------- */ 3$(function(){ 4 function createGoogleMap(mapInfo){ 5 var myMap = new google.maps.Map(document.getElementById(mapInfo.mapId), { 6 zoom: 17,// ãºã¼ã ã¬ãã« 7 center: new google.maps.LatLng(Number(mapInfo.lat), Number(mapInfo.lon)),// ä¸å¿ç¹ç·¯åº¦çµåº¦ 8 scaleControl: true,// è·é¢ç®çãã®è¡¨ç¤º 9 scrollwheel: false,// å°å³ã®ç¨®é¡ 10 mapTypeId: google.maps.MapTypeId.ROADMAP// ãã¦ã¹ã¹ã¯ãã¼ã« 11 }); 12 var myMarker = new google.maps.Marker({ 13 position: new google.maps.LatLng(Number(mapInfo.lat), Number(mapInfo.lon)),// ãã¼ã«ã¼ãç½®ã緯度çµåº¦ 14 map: myMap 15 }); 16 var myInfoWindow = new google.maps.InfoWindow({ 17 content: '<div><h1>'+mapInfo.content+'</h1></div>' 18 }); 19 myInfoWindow.open(myMap, myMarker); 20 21 // å¹ãåºããéãããããããã¼ã«ã¼ã¯ãªãã¯ã§åã³éãããã«ãã¦ãã 22 google.maps.event.addListener(myInfoWindow, "closeclick", function() { 23 google.maps.event.addListenerOnce(myMarker, "click", function(event) { 24 myInfoWindow.open(myMap, myMarker); 25 }); 26 }); 27 } 28 29 var mapInfo = new Array( 30 { 31 'mapId': 'map', 32 'lat': 34.6729761, 33 'lon': 135.4988188, 34 'content': 'skin å¿ææ©åº' 35 }, 36 { 37 'mapId': 'map2', 38 'lat': 34.7047845, 39 'lon': 135.5023288, 40 'content': 'skin æ¢ ç°åº' 41 } 42 ); 43 44 if(Array.isArray(mapInfo)){ 45 mapInfo.forEach(function(element, index, array){ 46 createGoogleMap(element); 47 }); 48 } 49}); 50 51/* page top 52-------------------------------------------------------------------------- */ 53$(function(){ 54 // viewport 55 var viewport = document.createElement('meta'); 56 viewport.setAttribute('name', 'viewport'); 57 viewport.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0'); 58 document.getElementsByTagName('head')[0].appendChild(viewport); 59 $(window).scroll(function () { 60 if($(this).scrollTop() > 0) { 61 $('#pagetop').fadeIn('fast'); 62 } else { 63 $('#pagetop').fadeOut('fast'); 64 } 65 }); 66}); 67 $(document).ready(function() { 68 var pagetop = $('.pagetop'); 69 $(window).scroll(function () { 70 if ($(this).scrollTop() > 700) { 71 pagetop.fadeIn(); 72 } else { 73 pagetop.fadeOut(); 74 } 75 }); 76 pagetop.click(function () { 77 $('body, html').animate({ scrollTop: 0 }, 500); 78 return false; 79 }); 80}); 81 82/* modal 83-------------------------------------------------------------------------- */ 84 $(function(){ 85 //ã°ãã¼ãã«å¤æ° 86 var nowModalSyncer = null ; //ç¾å¨éããã¦ããã¢ã¼ãã«ã³ã³ãã³ã 87 var modalClassSyncer = "modal-syncer" ; //ã¢ã¼ãã«ãéããªã³ã¯ã«ä»ããã¯ã©ã¹å 88 89 //ã¢ã¼ãã«ã®ãªã³ã¯ãåå¾ãã 90 var modals = document.getElementsByClassName( modalClassSyncer ) ; 91 92 //ã¢ã¼ãã«ã¦ã£ã³ãã¦ãåºç¾ãããã¯ãªãã¯ã¤ãã³ã 93 for(var i=0,l=modals.length; l>i; i++){ 94 95 //å ¨ã¦ã®ãªã³ã¯ã«ã¿ããã¤ãã³ããè¨å®ãã 96 modals[i].onclick = function(){ 97 98 //ãã¿ã³ãããã©ã¼ã«ã¹ãå¤ã 99 this.blur() ; 100 101 //ã¿ã¼ã²ããã¨ãªãã³ã³ãã³ããç¢ºèª 102 var target = this.getAttribute( "data-target" ) ; 103 104 //ã¿ã¼ã²ãããåå¨ããªããã°çµäº 105 if( typeof( target )=="undefined" || !target || target==null ){ 106 return false ; 107 } 108 109 //ã³ã³ãã³ãã¨ãªãè¦ç´ ãåå¾ 110 nowModalSyncer = document.getElementById( target ) ; 111 112 //ã¿ã¼ã²ãããåå¨ããªããã°çµäº 113 if( nowModalSyncer == null ){ 114 return false ; 115 } 116 117 //ãã¼ãã¼ãæä½ãªã©ã«ããããªã¼ãã¼ã¬ã¤ãå¤éèµ·åããã®ã鲿¢ãã 118 if( $( "#modal-overlay" )[0] ) return false ; //æ°ããã¢ã¼ãã«ã¦ã£ã³ãã¦ãèµ·åããªã 119 //if($("#modal-overlay")[0]) $("#modal-overlay").remove() ; //ç¾å¨ã®ã¢ã¼ãã«ã¦ã£ã³ãã¦ãåé¤ãã¦æ°ããèµ·åãã 120 121 //ãªã¼ãã¼ã¬ã¤ãåºç¾ããã 122 $( "body" ).append( '<div id="modal-overlay"></div>' ) ; 123 $( "#modal-overlay" ).fadeIn( "fast" ) ; 124 125 //ã³ã³ãã³ããã»ã³ã¿ãªã³ã°ãã 126 centeringModalSyncer() ; 127
128 //ã³ã³ãã³ãããã§ã¼ãã¤ã³ãã 129 $( nowModalSyncer ).fadeIn( "slow" ) ; 130 131 //[#modal-overlay]ãã¾ãã¯[#modal-close]ãã¯ãªãã¯ããã⦠132 $( "#modal-overlay,#modal-close" ).unbind().click( function() { 133 134 //[#modal-content]ã¨[#modal-overlay]ããã§ã¼ãã¢ã¦ãããå¾ã«â¦ 135 $( "#" + target + ",#modal-overlay" ).fadeOut( "fast" , function() { 136 137 //[#modal-overlay]ãåé¤ãã 138 $( '#modal-overlay' ).remove() ; 139 140 } ) ; 141 142 //ç¾å¨ã®ã³ã³ãã³ãæ å ±ãåé¤ 143 nowModalSyncer = null ; 144 145 }) ; 146 } 147 } 148 //ãªãµã¤ãºãããããã»ã³ã¿ãªã³ã°ããã颿°[centeringModalSyncer()]ãå®è¡ãã 149 $( window ).resize( centeringModalSyncer ) ; 150 151 //ã»ã³ã¿ãªã³ã°ãå®è¡ãã颿° 152 function centeringModalSyncer() { 153 154 //ã¢ã¼ãã«ã¦ã£ã³ãã¦ãéãã¦ãªããã°çµäº 155 if( nowModalSyncer == null ) return false ; 156 157 //ç»é¢(ã¦ã£ã³ãã¦)ã®å¹ ãé«ããåå¾ 158 var w = $( window ).width() ; 159 var h = $( window ).height() ; 160 161 //ã³ã³ãã³ã(#modal-content)ã®å¹ ãé«ããåå¾ 162 var cw = $( nowModalSyncer ).outerWidth( {margin:true} ) ; 163 var ch = $( nowModalSyncer ).outerHeight( {margin:true} ) ; 164 165 //ã»ã³ã¿ãªã³ã°ãå®è¡ãã 166 $( nowModalSyncer ).css( {"left": ((w - cw)/2) + "px","top": ((h - ch)/2) + "px"} ) ; 167 } 168 }); 169 170 171/* drawer 172-------------------------------------------------------------------------- */ 173 $(document).ready(function() { 174 $(".drawer").drawer(); 175 }); 176 // Option 177 $(".drawer").drawer({ 178 apiToggleClass: "element" 179 }); 180 181 // Open 182 $('.element').on(function() { 183 $('.drawer').drawer('open'); 184 }); 185 186 // close 187 $('.element').on(function() { 188 $('.drawer').drawer('close'); 189 }); 190 191 // toggle 192 $('.element').on(function() { 193 $('.drawer').drawer('toggle'); 194 }); 195 196 // destroy 197 $('.element').on(function() { 198 $('.drawer').drawer('destroy'); 199 }); 200 201 // Opened 202 $('#element').on('drawer.opened'); 203 204 // Closed 205 $('#element').on('drawer.closed'); 206 207 // $(document).ready(function(){ 208 // $(".group1").colorbox({rel:'group1'}); 209 // }); 210
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.