{"id":1118,"date":"2012-02-03T18:17:05","date_gmt":"2012-02-03T09:17:05","guid":{"rendered":"http:\/\/nanoappli.com\/blog\/?p=1118"},"modified":"2012-02-03T18:17:05","modified_gmt":"2012-02-03T09:17:05","slug":"jquery-jquery%e3%81%ae%e3%83%97%e3%83%ad%e3%83%91%e3%83%86%e3%82%a3%e3%80%8c-expr%e3%80%8d%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%a6%e3%80%81%e7%8b%ac%e8%87%aa%e3%81%ae%e3%82%bb%e3%83%ac","status":"publish","type":"post","link":"http:\/\/nanoappli.com\/blog\/archives\/1118","title":{"rendered":"[jQuery] jQuery\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u300c$.expr\u300d\u3092\u4f7f\u7528\u3057\u3066\u3001\u72ec\u81ea\u306e\u30bb\u30ec\u30af\u30bf\u3092\u5b9f\u88c5\u3059\u308b"},"content":{"rendered":"<p>\njQuery\u3067\u306f\u3001:first\u3001:last\u3084:animated\u306a\u3069\u306e\u30bb\u30ec\u30af\u30bf\u3067DOM\u306e\u30ce\u30fc\u30c9\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<br \/>\n\u3067\u306f\u3001jQuery\u306b\u6a19\u6e96\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u306a\u3044\u30bb\u30ec\u30af\u30bf\u304c\u6b32\u3057\u304f\u306a\u3063\u305f\u5834\u5408\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3057\u3087\u3046\u304b?<br \/>\n<br \/>\n<br \/>\n\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u306f\u3001$.expr[&#8216;:&#8217;]\u306b\u5bfe\u3057\u3066\u3001\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3067\u30bb\u30ec\u30af\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<br \/>\n\u4e0b\u8a18\u306e\u4f8b\u3067\u306f\u3001\u5e45\u304c100px\u3092\u8d85\u3048\u308b\u8981\u7d20\u306e\u307f\u3092\u62bd\u51fa\u3059\u308b\u30bb\u30ec\u30af\u30bf&#8221;over100pixels&#8221;\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<pre lang=\"javascript\">\n<script>\n$.extend($.expr[':'], {\n    over100pixels: function (e)\n    {\n        return $(e).width() > 100;\n    }\n});\n<\/script>\n<\/pre>\n<br \/>\n<br \/>\n\u5b9f\u969b\u306b\u3053\u306e\u30bb\u30ec\u30af\u30bf\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u81ea\u4f5c\u3057\u305f\u30bb\u30ec\u30af\u30bf\u3067\u3042\u308b\u4e8b\u3092\u610f\u8b58\u305b\u305a\u306b\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<br \/>\n<br \/>\n<pre lang=\"javascript\">\n<script>\n$(\".box:over100pixels\").click(function () {\n    alert(\"\u5e45100px\u4ee5\u4e0a\u306eBOX\u3067\u3059\u3002\");\n});\n<\/script>\n<div class=\"box\" style=\"width:80px\" \/>width:80px<\/div>\n<div class=\"box\" style=\"width:90px\" \/>width:90px<\/div>\n<div class=\"box\" style=\"width:100px\" \/>width:100px<\/div>\n<div class=\"box\" style=\"width:110px\" \/>width:110px<\/div>\n<div class=\"box\" style=\"width:120px\" \/>width:120px<\/div>\n<div class=\"box\" style=\"width:130px\" \/>width:130px<\/div>\n<\/pre>\n<br \/>\n<h2>\u30c6\u30b9\u30c8<\/h2>\n\u4e0b3\u3064\u306e\u8981\u7d20\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306e\u307f\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n<style>\ndiv.wrap {\n    border:1px solid #aaa;\n    background-color:#FFF;\n}\ndiv.box {\n\tbackground-color:#fcc;\n\tmargin:10px;\n\tpadding:10px;\n}\n<\/style><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.7.1\/jquery.min.js\"><\/script>\n<script>\n$(document).ready(function(){\n\t$.extend($.expr[':'], {\n\t    over100pixels: function (e)\n\t    {\n\t        return $(e).width() > 100;\n\t    }\n\t});\n\n\t$(\".box:over100pixels\").click(function () {\n\t    alert(\"\u5e45100px\u4ee5\u4e0a\u306eBOX\u3067\u3059\u3002\");\n\t});\n\n});\n<\/script>\n<div class=\"wrap\">\n    <div class=\"box\" style=\"width:80px\" \/>width:80px<\/div>\n    <div class=\"box\" style=\"width:90px\" \/>width:90px<\/div>\n    <div class=\"box\" style=\"width:100px\" \/>width:100px<\/div>\n    <div class=\"box\" style=\"width:110px\" \/>width:110px<\/div>\n    <div class=\"box\" style=\"width:120px\" \/>width:120px<\/div>\n    <div class=\"box\" style=\"width:130px\" \/>width:130px<\/div>\n<\/div>\n\t<br \/>\n\t<br \/>\n<br \/>\n\u3053\u306e\u8a18\u4e8b\u306f\u3001\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/182630\/jquery-tips-and-tricks\/382834#382834\">jQuery Tips and Tricks<\/a><br \/>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>jQuery\u3067\u306f\u3001:first\u3001:last\u3084:animated\u306a\u3069\u306e\u30bb\u30ec\u30af\u30bf\u3067DOM\u306e\u30ce\u30fc\u30c9\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002 \u3067\u306f\u3001jQuery\u306b\u6a19\u6e96\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u306a\u3044\u30bb\u30ec\u30af\u30bf\u304c\u6b32\u3057\u304f\u306a\u3063\u305f\u5834\u5408\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3057\u3087\u3046\u304b? \u3053\u306e\u3088\u3046\u306a\u5834\u5408\u306f\u3001$.expr[&#8216;:&#8217;]\u306b\u5bfe\u3057\u3066\u3001\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3067\u30bb\u30ec\u30af\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002 \u4e0b\u8a18\u306e\u4f8b\u3067\u306f\u3001\u5e45\u304c100px\u3092\u8d85\u3048\u308b\u8981\u7d20\u306e\u307f\u3092\u62bd\u51fa\u3059\u308b\u30bb\u30ec\u30af\u30bf&#8221;over100pixels&#8221;\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002 \u5b9f\u969b\u306b\u3053\u306e\u30bb\u30ec\u30af\u30bf\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u81ea\u4f5c\u3057\u305f\u30bb\u30ec\u30af\u30bf\u3067\u3042\u308b\u4e8b\u3092\u610f\u8b58\u305b\u305a\u306b\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002 width:80p\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[18],"tags":[14],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1205,"url":"http:\/\/nanoappli.com\/blog\/archives\/1205","url_meta":{"origin":1118,"position":0},"title":"[jQuery]\u30bb\u30ec\u30af\u30bf\u3067\u6307\u5b9a\u3057\u305f\u30ce\u30fc\u30c9\u306e\u5b58\u5728\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u95a2\u6570","date":"2012\u5e742\u67085\u65e5","format":false,"excerpt":"jQuery\u3067\u306f\u6307\u5b9a\u3057\u305f\u30ce\u30fc\u30c9\u304c\u5b58\u5728\u3059\u308b\u304b\u3092\u5b58\u5728\u3059\u308b\u30c1\u30a7\u30c3\u30af\u95a2\u6570\u304c\u6709\u308a\u307e\u305b\u3093\u3002 \u5e78\u3044\u3001jQuery\u3067\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1139,"url":"http:\/\/nanoappli.com\/blog\/archives\/1139","url_meta":{"origin":1118,"position":1},"title":"[jQuery]\u65b0\u3057\u3044\u30ce\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u3068\u304d\u306b\u3001\u30bf\u30b0\u306e\u5c5e\u6027\u3082\u540c\u6642\u306b\u6307\u5b9a\u3059\u308b\u65b9\u6cd5","date":"2012\u5e742\u67083\u65e5","format":false,"excerpt":"jQuery\u3067\u306f\u3001$( \"<a \/>\" )\u3068\u3044\u3046\u8868\u8a18\u3067\u65b0\u3057\u3044DOM\u30ce\u30fc\u30c9\u3092\u4f5c\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1135,"url":"http:\/\/nanoappli.com\/blog\/archives\/1135","url_meta":{"origin":1118,"position":2},"title":"[jQuery]\u6307\u5b9a\u3057\u305f\u30ce\u30fc\u30c9\u304c\u5b58\u5728\u3059\u308b\u3068\u304d\u306e\u307f\u51e6\u7406\u3092\u884c\u3046","date":"2012\u5e742\u67083\u65e5","format":false,"excerpt":"jQuery\u3067\u306f\u3001$( \"#btnShow\" )\u3068\u3044\u3063\u305f\u5f62\u5f0f\u3067\u3001\u7279\u5b9a\u306eDOM\u30ce\u30fc\u30c9\u3092\u6307\u5b9a\u53ef\u80fd\u3067\u3059\u3002 \u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5717,"url":"http:\/\/nanoappli.com\/blog\/archives\/5717","url_meta":{"origin":1118,"position":3},"title":"Androide\u5411\u3051Web\u30b5\u30a4\u30c8\u3067\u3001\u6a2a\u30b9\u30af\u30ed\u30fc\u30eb\u3055\u305b\u306a\u3044\u3088\u3046\u306b\u3059\u308b","date":"2012\u5e7411\u670811\u65e5","format":false,"excerpt":"html>head\u306e\u4e2d\u306b\u3001\u4ee5\u4e0b\u306e\u30bf\u30b0\u3092\u5165\u308c\u308b\u3068\u3001\u6a2a\u30b9\u30af\u30ed\u30fc\u30eb\u304c\u51fa\u306a\u3044\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u307e\u305f\u3001maxi\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1296,"url":"http:\/\/nanoappli.com\/blog\/archives\/1296","url_meta":{"origin":1118,"position":4},"title":"http:\/\/www.google.com\/jsapi\u3092\u4f7f\u7528\u3057\u3066jQuery\u3092\u30ed\u30fc\u30c9\u3059\u308b\u3068\u304d\u306e\u6ce8\u610f\u70b9","date":"2012\u5e742\u670810\u65e5","format":false,"excerpt":"http:\/\/www.google.com\/jsapi\u3092\u4f7f\u7528\u3057\u305f\u3001jQuery\u306e\u30ed\u30fc\u30c9 \u4ee5\u4e0b\u306e\u8a18\u8ff0\u3067\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3996,"url":"http:\/\/nanoappli.com\/blog\/archives\/3996","url_meta":{"origin":1118,"position":5},"title":"\u300cCPU\u306e\u5275\u308a\u304b\u305f\u300d\u306f\u3001\u30d1\u30bf\u30d8\u30cd\u672c\u306e\u6b21\u306b\u5fc5\u8aad\u306e\u4e00\u518a","date":"2012\u5e748\u670817\u65e5","format":false,"excerpt":"CPU\u306e\u5275\u308a\u304b\u305f CPU\u8a2d\u8a08\u306e\u8d85\u5165\u9580\u66f8\u3068\u3057\u3066\u826f\u66f8\u3068\u3068\u3044\u3046\u8a55\u5224\u3060\u3063\u305f\u306e\u3067\u3001\u8aad\u3093\u3067\u307f\u307e\u3057\u305f\u3002 \u8868\u7d19\u306e\u7d75\u306f\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/1118"}],"collection":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/comments?post=1118"}],"version-history":[{"count":16,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/1118\/revisions"}],"predecessor-version":[{"id":1134,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/1118\/revisions\/1134"}],"wp:attachment":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/media?parent=1118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/categories?post=1118"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/tags?post=1118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}