{"id":1464,"date":"2018-08-24T19:55:36","date_gmt":"2018-08-24T10:55:36","guid":{"rendered":"http:\/\/4koma-web.com\/coding\/?p=1464"},"modified":"2018-08-24T20:02:11","modified_gmt":"2018-08-24T11:02:11","slug":"jquery%e5%9c%b0%e5%9f%9f%e5%88%a5%e3%81%ab%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e3%82%92%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e5%88%86%e3%81%91%e3%81%99%e3%82%8b%e3%83%a1%e3%83%8b","status":"publish","type":"post","link":"https:\/\/4koma-web.com\/coding\/jquery%e5%9c%b0%e5%9f%9f%e5%88%a5%e3%81%ab%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e3%82%92%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e5%88%86%e3%81%91%e3%81%99%e3%82%8b%e3%83%a1%e3%83%8b\/","title":{"rendered":"[jQuery]\u5730\u57df\u5225\u306b\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u30ab\u30c6\u30b4\u30ea\u30fc\u5206\u3051\u3059\u308b\u30e1\u30cb\u30e5\u30fc"},"content":{"rendered":"<p>1\u30da\u30fc\u30b8\u306b\u5317\u6d77\u9053\u304b\u3089\u6c96\u7e04\u307e\u3067\u306e\u5730\u57df\u3084\u30b7\u30e7\u30c3\u30d7\u540d\u306a\u3069\u3067\u3001<\/p>\n<p>\u30af\u30e9\u30b9\u540d\u300cshopSelectBtn\u300d\u3092\u62bc\u3057\u305f\u3068\u304d\u3001\u8a72\u5f53\u3059\u308b\u5730\u57df\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u8868\u793a\u3055\u308c\u308b\u3001\u30e1\u30cb\u30e5\u30fc\u3067\u3059\u3002<\/p>\n<p><!--\u30ab\u30c6\u30b4\u30ea\u30dc\u30bf\u30f3--><\/p>\n<pre>\r\n   <ul class=\"shopSelectBtn\">\r\n        <li class=\"area_all\"><a>\u5168\u3066\u8868\u793a<\/a><\/li>\r\n        <li class=\"area_hokkaido\"><a>\u5317\u6d77\u9053<\/a><\/li>\r\n        <li class=\"area_tohoku\"><a>\u6771\u5317<\/a><\/li>\r\n        <li class=\"area_kanto\"><a>\u95a2\u6771<\/a><\/li>\r\n        <li class=\"area_koshinetsu\"><a>\u7532\u4fe1\u8d8a\u30fb\u5317\u9678<\/a><\/li>\r\n        <li class=\"area_tokai\"><a>\u6771\u6d77<\/a><\/li>\r\n        <li class=\"area_kinki\"><a>\u8fd1\u757f<\/a><\/li>\r\n        <li class=\"area_chugoku\"><a>\u4e2d\u56fd<\/a><\/li>\r\n        <li class=\"area_shikoku\"><a>\u56db\u56fd<\/a><\/li>\r\n        <li class=\"area_kyushu\"><a>\u4e5d\u5dde<\/a><\/li>\r\n        <li class=\"area_okinawa\"><a>\u6c96\u7e04<\/a><\/li>\r\n<\/ul>\r\n<ul class=\"shopSelectBtn\">\r\n        <li class=\"type_all\"><a>\u5168\u3066\u8868\u793a<\/a><\/li>\r\n        <li class=\"type_cafe\"><a>\u30b7\u30e7\u30c3\u30d7\u540d01<\/a><\/li>\r\n        <li class=\"type_salon\"><a>\u30b7\u30e7\u30c3\u30d7\u540d02<\/a><\/li>\r\n<\/ul>\r\n\r\n<!--\u30ab\u30c6\u30b4\u30ea\u3054\u3068\u306b\u8868\u793a\u3055\u308c\u308b\u5185\u5bb9-->\r\n<ul class=\"category-list clear item-list\">        \r\n        <li>\r\n\u3000\u3000\u3000\u3000\u3000<div class=\"shopDetail\">\r\n\u3000\u3000\u3000\u3000\u3000\u3000<p class=\"area\">\u5317\u6d77\u9053<\/p>\r\n\u3000\u3000\u3000\u3000\u3000\u3000<p class=\"shopDetail_shopName\">\u5e97\u8217\u540d<\/p>\r\n\u3000\u3000\u3000\u3000\u3000\u3000<p>\u4f4f\u62404<\/p>\r\n\u3000\u3000\u3000\u3000\u3000<\/div>\r\n        <\/li>\r\n        <li>\r\n\u3000\u3000\u3000\u3000\u3000<div class=\"shopDetail\">\r\n\u3000\u3000\u3000\u3000\u3000\u3000<p class=\"area\">\u6771\u5317<\/p>\r\n\u3000\u3000\u3000\u3000\u3000\u3000<p class=\"shopDetail_shopName\">\u5e97\u8217\u540d<\/p>\r\n\u3000\u3000\u3000\u3000\u3000\u3000<p>\u4f4f\u62404<\/p>\r\n\u3000\u3000\u3000\u3000\u3000<\/div>\r\n        <\/li>\r\n    <\/ul>\r\n<\/pre>\n<pre>\r\n<script>\r\n$('.shopSelectBtn li').click(function(){\r\n              var area = $(this).find('a').text();\r\n                   $('.category-list li .area').each(function(){\r\n                        var shop = $(this).text(); \r\n  \r\n                          if(area == shop){\r\n                              $(this).parents('li').show();\r\n                        }else if(area == '\u5168\u3066\u8868\u793a'){                                         \r\n                              $(this).parents('li').show();\r\n                        }else{\r\n                              $(this).parents('li').hide();\r\n                       }     \r\n               });\r\n               if(area == '\u5168\u3066\u8868\u793a'){\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 var all=\"\";\r\n                   $(this).parent().find('li').each(function(){\r\n                       all = all + $(this).find('a').text();\r\n                   });\r\n                      console.log(all);\r\n                        $('.category-list .area').each(function(){\r\n                                 var shop_in = $(this).text();\r\n                                 \r\n                                 console.log(shop_in);\r\n                               \t if (all.match(shop_in)) {\r\n                                              $(this).parents('li').show();\r\n\t                          }else{\r\n                                               $(this).parents('li').hide();\r\n                                  }\r\n                        });\r\n               }\r\n});\r\n<\/script>\r\n<\/pre>\n<pre>\r\n<li class=\"area_hokkaido\"><a>\u5317\u6d77\u9053<\/a><\/li>\r\n\u3068\r\n<p class=\"area\">\u5317\u6d77\u9053<\/p>\r\n<\/pre>\n<p>\u3068\u4e0a\u8a18\u306e\u3088\u3046\u306b\u5317\u6d77\u9053\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3068\u304d\u30af\u30e9\u30b9\u300c.area\u300d\u306e\u5185\u5bb9\u304c\u5317\u6d77\u9053\u306e\u30ab\u30c6\u30b4\u30ea\u30fc\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u30da\u30fc\u30b8\u306b\u5317\u6d77\u9053\u304b\u3089\u6c96\u7e04\u307e\u3067\u306e\u5730\u57df\u3084\u30b7\u30e7\u30c3\u30d7\u540d\u306a\u3069\u3067\u3001 \u30af\u30e9\u30b9\u540d\u300cshopSelectBtn\u300d\u3092\u62bc\u3057\u305f\u3068\u304d\u3001\u8a72\u5f53\u3059\u308b\u5730\u57df\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u8868\u793a\u3055\u308c\u308b\u3001\u30e1\u30cb\u30e5\u30fc\u3067\u3059\u3002 \u5168\u3066\u8868\u793a \u5317\u6d77\u9053 \u6771\u5317 \u95a2\u6771 \u7532\u4fe1\u8d8a\u30fb\u5317\u9678 \u6771\u6d77 \u8fd1\u757f \u4e2d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"","_original_post":"","footnotes":""},"categories":[1],"tags":[],"publishpress_future_action":{"enabled":false,"date":"2026-04-21 23:55:15","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category"},"_links":{"self":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/1464"}],"collection":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/comments?post=1464"}],"version-history":[{"count":0,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/1464\/revisions"}],"wp:attachment":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/media?parent=1464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/categories?post=1464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/tags?post=1464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}