{"id":2110,"date":"2014-03-07T14:43:39","date_gmt":"2014-03-07T06:43:39","guid":{"rendered":"http:\/\/www.hiheng.com\/blog\/?p=2110"},"modified":"2015-03-11T15:30:42","modified_gmt":"2015-03-11T07:30:42","slug":"jquery-1-9%e7%89%88%e6%9c%ac%e7%9a%84%e5%8f%98%e5%8c%96","status":"publish","type":"post","link":"http:\/\/www.hiheng.com\/blog\/?p=2110","title":{"rendered":"jQuery 1.9\u7248\u672c\u7684\u53d8\u5316"},"content":{"rendered":"<p>\u9879\u76ee\u7ec8\u4e8e\u9762\u4e34jquery \u7248\u672c\u5347\u7ea7\u95ee\u9898\u4e86\uff0c\u53c8\u8981\u5f00\u59cb\u8bfb\u5404\u79cd\u6587\u6863\uff0c\u5199\u5404\u79cddemo\u3002\u8bdd\u8bf4\u4e5f\u5f88\u4e45\u6ca1\u9759\u4e0b\u5fc3\u6765\u5199\u7801\u4e86\u3002<\/p>\n<blockquote ><p>\n<strong>.toggle(function, function, &#8230; )  \u65b9\u6cd5\u79fb\u9664<\/strong><br \/>\ntoggle() \u65b9\u6cd5: \u7528\u4e8e\u7ed1\u5b9a\u4e24\u4e2a\u6216\u591a\u4e2a\u4e8b\u4ef6\u5904\u7406\u5668\u51fd\u6570\uff0c\u4ee5\u54cd\u5e94\u88ab\u9009\u5143\u7d20\u7684\u8f6e\u6d41\u7684 click \u4e8b\u4ef6\u3002<br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u4e2d\u8be5\u65b9\u6cd5\u88ab\u79fb\u9664\uff0c\u672a\u63d0\u4f9b\u66ff\u6362\u65b9\u6cd5\u3002<br \/>\n<\/blockquote >\n<blockquote ><p>\n<strong>$.browser() \u65b9\u6cd5\u79fb\u9664<\/strong><br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u4e2d\u8be5\u65b9\u6cd5\u88ab\u79fb\u9664\uff0c\u9700\u8981\u53e6\u5199\u63d2\u4ef6\u6765\u5b8c\u6210\u3002<br \/>\n<\/blockquote >\n<blockquote ><p>\n<strong>.live() \u65b9\u6cd5\u79fb\u9664<\/strong><br \/>\n.live()\u65b9\u6cd5\uff1a\u4e3a\u88ab\u9009\u5143\u7d20\u9644\u52a0\u4e00\u4e2a\u6216\u591a\u4e2a\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\uff0c\u5e76\u89c4\u5b9a\u5f53\u8fd9\u4e9b\u4e8b\u4ef6\u53d1\u751f\u65f6\u8fd0\u884c\u7684\u51fd\u6570\u3002<br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u8be5\u65b9\u6cd5\u88ab\u79fb\u9664\uff0c\u5347\u7ea7\u540e\u7684\u65b9\u6cd5\u7528 \u201c.on()\u201d \u6765\u66ff\u6362\u3002<br \/>\n<\/blockquote >\n<blockquote ><p>\n<strong>.die() \u65b9\u6cd5\u79fb\u9664<\/strong><br \/>\n.die() \u65b9\u6cd5\uff1a\u79fb\u9664\u6240\u6709\u901a\u8fc7 live() \u65b9\u6cd5\u5411\u6307\u5b9a\u5143\u7d20\u6dfb\u52a0\u7684\u4e00\u4e2a\u6216\u591a\u4e2a\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\u3002<br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u4e2d\u201c.live()\u201d\u65b9\u6cd5\u88ab\u79fb\u9664\uff0c\u56e0\u6b64\u8be5\u65b9\u6cd5\u4e5f\u4e00\u6837\u88ab\u5220\u9664\u3002 \u7531\u201c.off()\u201d\u6765\u66ff\u4ee3\u3002<br \/>\n<\/blockquote >\n<blockquote ><p>\n<strong>.sub() \u65b9\u6cd5\u79fb\u9664  <\/strong><br \/>\n.sub\u65b9\u6cd5\uff1a  \u53ef\u521b\u5efa\u4e00\u4e2a\u65b0\u7684jQuery\u526f\u672c\uff0c\u4e0d\u5f71\u54cd\u539f\u6709\u7684jQuery\u5bf9\u50cf\u3002<br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u8be5\u65b9\u6cd5\u88ab\u79fb\u9664\u3002<br \/>\n<\/blockquote >\n<block><br \/>\n<strong>ajax\u4e8b\u4ef6\u9700\u8981\u7ed1\u5b9a\u5230document\u4e0a<\/strong><br \/>\n\u5982.addBack()\u3001 .addStart()\uff0c\u9700\u8981\u7ed1\u5b9a\u5728document\u3002<br \/>\n<\/blockquote >\n<p>jQuery\u5b98\u65b9\u6587\u6863:<a href=\"http:\/\/jquery.com\/upgrade-guide\/1.9\/\"  target=\"_blank\">http:\/\/jquery.com\/upgrade-guide\/1.9\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9879\u76ee\u7ec8\u4e8e\u9762\u4e34jquery \u7248\u672c\u5347\u7ea7\u95ee\u9898\u4e86\uff0c\u53c8\u8981\u5f00\u59cb\u8bfb\u5404\u79cd\u6587\u6863\uff0c\u5199\u5404\u79cddemo\u3002\u8bdd\u8bf4\u4e5f\u5f88\u4e45\u6ca1\u9759\u4e0b\u5fc3\u6765\u5199\u7801\u4e86\u3002<\/p>\n<blockquote ><p>\n<strong>.toggle(function, function, &#8230; )  \u65b9\u6cd5\u79fb\u9664<\/strong><br \/>\ntoggle() \u65b9\u6cd5: \u7528\u4e8e\u7ed1\u5b9a\u4e24\u4e2a\u6216\u591a\u4e2a\u4e8b\u4ef6\u5904\u7406\u5668\u51fd\u6570\uff0c\u4ee5\u54cd\u5e94\u88ab\u9009\u5143\u7d20\u7684\u8f6e\u6d41\u7684 click \u4e8b\u4ef6\u3002<br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u4e2d\u8be5\u65b9\u6cd5\u88ab\u79fb\u9664\uff0c\u672a\u63d0\u4f9b\u66ff\u6362\u65b9\u6cd5\u3002<br \/>\n<\/blockquote >\n<blockquote ><p>\n<strong>$.browser() \u65b9\u6cd5\u79fb\u9664<\/strong><br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u4e2d\u8be5\u65b9\u6cd5\u88ab\u79fb\u9664\uff0c\u9700\u8981\u53e6\u5199\u63d2\u4ef6\u6765\u5b8c\u6210\u3002<br \/>\n<\/blockquote >\n<blockquote ><p>\n<strong>.live() \u65b9\u6cd5\u79fb\u9664<\/strong><br \/>\n.live()\u65b9\u6cd5\uff1a\u4e3a\u88ab\u9009\u5143\u7d20\u9644\u52a0\u4e00\u4e2a\u6216\u591a\u4e2a\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\uff0c\u5e76\u89c4\u5b9a\u5f53\u8fd9\u4e9b\u4e8b\u4ef6\u53d1\u751f\u65f6\u8fd0\u884c\u7684\u51fd\u6570\u3002<br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u8be5\u65b9\u6cd5\u88ab\u79fb\u9664\uff0c\u5347\u7ea7\u540e\u7684\u65b9\u6cd5\u7528 \u201c.on()\u201d \u6765\u66ff\u6362\u3002<br \/>\n<\/blockquote >\n<blockquote ><p>\n<strong>.die() \u65b9\u6cd5\u79fb\u9664<\/strong><br \/>\n.die() \u65b9\u6cd5\uff1a\u79fb\u9664\u6240\u6709\u901a\u8fc7 live() \u65b9\u6cd5\u5411\u6307\u5b9a\u5143\u7d20\u6dfb\u52a0\u7684\u4e00\u4e2a\u6216\u591a\u4e2a\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\u3002<br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u4e2d\u201c.live()\u201d\u65b9\u6cd5\u88ab\u79fb\u9664\uff0c\u56e0\u6b64\u8be5\u65b9\u6cd5\u4e5f\u4e00\u6837\u88ab\u5220\u9664\u3002 \u7531\u201c.off()\u201d\u6765\u66ff\u4ee3\u3002<br \/>\n<\/blockquote >\n<blockquote ><p>\n<strong>.sub() \u65b9\u6cd5\u79fb\u9664  <\/strong><br \/>\n.sub\u65b9\u6cd5\uff1a  \u53ef\u521b\u5efa\u4e00\u4e2a\u65b0\u7684jQuery\u526f\u672c\uff0c\u4e0d\u5f71\u54cd\u539f\u6709\u7684jQuery\u5bf9\u50cf\u3002<br \/>\n\u5728 jQuery 1.9 \u7248\u672c\u8be5\u65b9\u6cd5\u88ab\u79fb\u9664\u3002<br \/>\n<\/blockquote >\n<block><br \/>\n<strong>ajax\u4e8b\u4ef6\u9700\u8981\u7ed1\u5b9a\u5230document\u4e0a<\/strong><br \/>\n\u5982.addBack()\u3001 .addStart()\uff0c\u9700\u8981\u7ed1\u5b9a\u5728document\u3002<br \/>\n<\/blockquote >\n<p>jQuery\u5b98\u65b9\u6587\u6863:<a href=\"http:\/\/jquery.com\/upgrade-guide\/1.9\/\"  target=\"_blank\">http:\/\/jquery.com\/upgrade-guide\/1.9\/<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[151,11],"tags":[14],"class_list":["post-2110","post","type-post","status-publish","format-standard","hentry","category-javascript","category-11","tag-jquery"],"_links":{"self":[{"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2110"}],"version-history":[{"count":16,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2110\/revisions"}],"predecessor-version":[{"id":2149,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2110\/revisions\/2149"}],"wp:attachment":[{"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2110"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hiheng.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}