{"id":7071,"date":"2012-05-14T03:34:02","date_gmt":"2012-05-13T18:34:02","guid":{"rendered":"http:\/\/fukata.org\/?p=7071"},"modified":"2017-08-11T23:00:55","modified_gmt":"2017-08-11T23:00:55","slug":"javascript-adjust-image-size-wordpress-theme-tanzaku","status":"publish","type":"post","link":"https:\/\/blog.fukata.org\/archives\/7071\/","title":{"rendered":"WordPress\u30c6\u30fc\u30de\u300ctanzaku\u300d\u306e\u753b\u50cf\u30b5\u30a4\u30ba\u3092\u8abf\u6574\u3059\u308bJS"},"content":{"rendered":"
WordPress \u203a tanzaku \u00ab Free WordPress Themes<\/a>\u306e\u30c6\u30fc\u30de\u3092\u4f7f\u3063\u3066\u30d6\u30ed\u30b0\u3092\u4e00\u3064\u4f5c\u3063\u3066\u307f\u305f\u3093\u3067\u3059\u304c\u3001\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306a\u3069\u306e\u77ed\u518a\u5185\u306b\u8868\u793a\u3055\u308c\u308b\u753b\u50cf\u304cWordPress\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u3082\u306e\u3067\u306f\u306a\u304f\u3001Flickr\u306e\u3082\u306e\u3060\u3063\u305f\u306e\u3067\u6b63\u5e38\u306b\u753b\u50cf\u30b5\u30a4\u30ba\u3092\u53d6\u5f97\u3067\u304d\u305a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e290×290\u3067\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3044\u3001\u6b6a\u3093\u3060\u3088\u3046\u306a\u5f62\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n \u305d\u3053\u3067\u3001JS\u3067\u7c21\u5358\u306b\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u753b\u50cf\u30b5\u30a4\u30ba\u3092\u8abf\u6574\u3059\u308b\u3088\u3046\u306aJS\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n <\/p>\n \u3053\u308c\u3092header.php\u5185\u306b\u3042\u308b\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u306e\u76f4\u4e0b\u304f\u3089\u3044\u306b\u8cbc\u308a\u4ed8\u3051\u308c\u3070\u6b63\u5e38\u306b\u52d5\u4f5c\u3059\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n WordPress \u203a tanzaku \u00ab Free WordPress Themes\u306e\u30c6\u30fc\u30de\u3092\u4f7f\u3063\u3066\u30d6\u30ed\u30b0\u3092\u4e00\u3064\u4f5c\u3063\u3066\u307f\u305f\u3093\u3067\u3059\u304c\u3001\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306a\u3069\u306e\u77ed\u518a\u5185\u306b\u8868\u793a\u3055\u308c\u308b\u753b\u50cf\u304cWordPress\u306b\u30a2\u30c3 … \u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":9223372036854775807,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1980],"tags":[972],"_links":{"self":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/7071"}],"collection":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/comments?post=7071"}],"version-history":[{"count":0,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/7071\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media\/9223372036854775807"}],"wp:attachment":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media?parent=7071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/categories?post=7071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/tags?post=7071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\r\n $('.grid-image img').each(function(){\r\n var $img = $(this);\r\n $img.hide().attr({ width: \"\", height: \"\" });\r\n var w = $img.width();\r\n var h = $img.height();\r\n if (w >= h) {\r\n w = 290;\r\n h = 217;\r\n } else {\r\n w = 217;\r\n h = 290;\r\n }\r\n $img.attr({ width: w, height: h }).show();\r\n });\r\n<\/pre>\n
\r\n(function($){\r\n $(function(){\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"