{"id":2414,"date":"2019-04-04T02:45:12","date_gmt":"2019-04-03T17:45:12","guid":{"rendered":"http:\/\/www.cotegg.com\/blog\/?p=2414"},"modified":"2019-04-04T02:46:19","modified_gmt":"2019-04-03T17:46:19","slug":"javascript%e3%81%a7%e7%94%bb%e9%9d%a2%e3%82%b5%e3%82%a4%e3%82%ba%e6%af%8e%e3%81%ab%e5%87%a6%e7%90%86%e3%82%92%e3%81%97%e3%81%9f%e3%81%84%e6%99%82","status":"publish","type":"post","link":"https:\/\/www.cotegg.com\/blog\/?p=2414","title":{"rendered":"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f<\/p>\n<p>\u4eca\u56de\u306fjavascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642\u306b\u30aa\u30b9\u30b9\u30e1\u306e\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u30e1\u30c7\u30a3\u30a2\u30af\u30a8\u30ea\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u304d\u3063\u3066<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n@media screen and (max-width: 767px) { \r\n  \/* \u30b9\u30de\u30db *\/\r\n}\r\n@media screen and (min-width: 768px) and ( max-width: 1024px) {\r\n  \/* \u30bf\u30d6\u30ec\u30c3\u30c8 *\/\r\n}\r\n@media screen and (min-width:1025px) {\r\n  \/*\u3000PC\u3000*\/\r\n}\r\n<\/pre>\n<p>\u307f\u305f\u3044\u306a\u611f\u3058\u306b\u306a\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066javascript\u3067\u30b9\u30de\u30db\u306e\u753b\u9762\u30b5\u30a4\u30ba\u6642\u3060\u3051\u51e6\u7406\u3092\u3057\u305f\u3044\u3068\u3044\u3046\u3068\u304d\u306b<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$width = window.width()\r\nif ($width &lt; 768) {\r\n  \/\/ \u3084\u308a\u305f\u3044\u51e6\u7406\r\n}\r\n<\/pre>\n<p>\u307e\u305a\u30d6\u30e9\u30a6\u30b6\u306e\u6a2a\u5e45\u3092\u53d6\u5f97\u3057\u3066\u30e1\u30c7\u30a3\u30a2\u30af\u30a8\u30ea\u3067\u8a2d\u5b9a\u3057\u305f\u5024\u3068\u6bd4\u8f03\u3057\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3001\u3053\u306e\u3084\u308a\u65b9\u3060\u3068\u4fee\u6b63\u304c\u5165\u3063\u305f\u6642\u3051\u3063\u3053\u3046\u3081\u3093\u3069\u304f\u3055\u3044\u306e\u3067<br \/>\n\u4ee3\u308f\u308a\u306bfont-family\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n@media screen and (max-width: 767px) { \r\n  \/* \u30b9\u30de\u30db *\/\r\n  .l-sizedetect {\r\n    font-family: 'sp';\r\n  }\r\n}\r\n@media screen and (min-width: 768px) and ( max-width: 1024px) {\r\n  \/* \u30bf\u30d6\u30ec\u30c3\u30c8 *\/\r\n  .l-sizedetect {\r\n    font-family: 'tablet';\r\n  }\r\n}\r\n@media screen and (min-width:1025px) {\r\n  \/*\u3000PC\u3000*\/\r\n  .l-sizedetect {\r\n    font-family: 'pc';\r\n  }\r\n}\r\n<\/pre>\n<p>\u5f8c\u306fjavascript\u5074\u3067l-sizedetect\u306ecss\u3092\u53d6\u5f97\u3057\u3066\u3084\u308c\u3070OK\u3067\u3059\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nif ($('l-sizedetect').css('font-family') === 'sp') {\r\n  \/\/ \u30b9\u30de\u30db\u3067\u3084\u308a\u305f\u3044\u51e6\u7406\r\n} else if($('l-sizedetect').css('font-family') === 'tablet') {\r\n  \/\/ \u30bf\u30d6\u30ec\u30c3\u30c8\u3067\u3084\u308a\u305f\u3044\u51e6\u7406\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f \u4eca\u56de\u306fjavascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642\u306b\u30aa\u30b9\u30b9\u30e1\u306e &#8230; <\/p>\n","protected":false},"author":101012,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[7],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cotegg.com\/blog\/?p=2414\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"og:description\" content=\"\u3053\u3093\u306b\u3061\u306f \u4eca\u56de\u306fjavascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642\u306b\u30aa\u30b9\u30b9\u30e1\u306e ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cotegg.com\/blog\/?p=2414\" \/>\n<meta property=\"og:site_name\" content=\"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/COTegg.japan\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-03T17:45:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-03T17:46:19+00:00\" \/>\n<meta name=\"author\" content=\"asakos\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:site\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"asakos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=2414#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=2414\"},\"author\":{\"name\":\"asakos\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/eabce460c5ae1b67a47e64637cb2ec3f\"},\"headline\":\"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642\",\"datePublished\":\"2019-04-03T17:45:12+00:00\",\"dateModified\":\"2019-04-03T17:46:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=2414\"},\"wordCount\":80,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"articleSection\":[\"\u6280\u8853\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=2414#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=2414\",\"url\":\"https:\/\/www.cotegg.com\/blog\/?p=2414\",\"name\":\"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\"},\"datePublished\":\"2019-04-03T17:45:12+00:00\",\"dateModified\":\"2019-04-03T17:46:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=2414#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=2414\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=2414#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.cotegg.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"name\":\"COTegg\u306e\u30d0\u30b1\u30c4\",\"description\":\"- Bucket of cotegg -\",\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\",\"name\":\"COTegg Inc.\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"contentUrl\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"width\":176,\"height\":60,\"caption\":\"COTegg Inc.\"},\"image\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/COTegg.japan\/\",\"https:\/\/twitter.com\/cotegg_japan\",\"https:\/\/www.instagram.com\/cotegg_japan\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/eabce460c5ae1b67a47e64637cb2ec3f\",\"name\":\"asakos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/54e850f2929db050ecd3dadaa9f93ef6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/54e850f2929db050ecd3dadaa9f93ef6?s=96&d=mm&r=g\",\"caption\":\"asakos\"},\"url\":\"https:\/\/www.cotegg.com\/blog\/?author=101012\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cotegg.com\/blog\/?p=2414","og_locale":"ja_JP","og_type":"article","og_title":"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","og_description":"\u3053\u3093\u306b\u3061\u306f \u4eca\u56de\u306fjavascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642\u306b\u30aa\u30b9\u30b9\u30e1\u306e ...","og_url":"https:\/\/www.cotegg.com\/blog\/?p=2414","og_site_name":"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","article_publisher":"https:\/\/www.facebook.com\/COTegg.japan\/","article_published_time":"2019-04-03T17:45:12+00:00","article_modified_time":"2019-04-03T17:46:19+00:00","author":"asakos","twitter_card":"summary_large_image","twitter_creator":"@cotegg_japan","twitter_site":"@cotegg_japan","twitter_misc":{"\u57f7\u7b46\u8005":"asakos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cotegg.com\/blog\/?p=2414#article","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=2414"},"author":{"name":"asakos","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/eabce460c5ae1b67a47e64637cb2ec3f"},"headline":"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642","datePublished":"2019-04-03T17:45:12+00:00","dateModified":"2019-04-03T17:46:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=2414"},"wordCount":80,"commentCount":0,"publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"articleSection":["\u6280\u8853"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cotegg.com\/blog\/?p=2414#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cotegg.com\/blog\/?p=2414","url":"https:\/\/www.cotegg.com\/blog\/?p=2414","name":"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/#website"},"datePublished":"2019-04-03T17:45:12+00:00","dateModified":"2019-04-03T17:46:19+00:00","breadcrumb":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=2414#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cotegg.com\/blog\/?p=2414"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cotegg.com\/blog\/?p=2414#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cotegg.com\/blog"},{"@type":"ListItem","position":2,"name":"javascript\u3067\u753b\u9762\u30b5\u30a4\u30ba\u6bce\u306b\u51e6\u7406\u3092\u3057\u305f\u3044\u6642"}]},{"@type":"WebSite","@id":"https:\/\/www.cotegg.com\/blog\/#website","url":"https:\/\/www.cotegg.com\/blog\/","name":"COTegg\u306e\u30d0\u30b1\u30c4","description":"- Bucket of cotegg -","publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.cotegg.com\/blog\/#organization","name":"COTegg Inc.","url":"https:\/\/www.cotegg.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","contentUrl":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","width":176,"height":60,"caption":"COTegg Inc."},"image":{"@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/COTegg.japan\/","https:\/\/twitter.com\/cotegg_japan","https:\/\/www.instagram.com\/cotegg_japan\/"]},{"@type":"Person","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/eabce460c5ae1b67a47e64637cb2ec3f","name":"asakos","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/54e850f2929db050ecd3dadaa9f93ef6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/54e850f2929db050ecd3dadaa9f93ef6?s=96&d=mm&r=g","caption":"asakos"},"url":"https:\/\/www.cotegg.com\/blog\/?author=101012"}]}},"_links":{"self":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2414"}],"collection":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/101012"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2414"}],"version-history":[{"count":3,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2414\/revisions"}],"predecessor-version":[{"id":2434,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2414\/revisions\/2434"}],"wp:attachment":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}