﻿{"id":1203,"date":"2010-08-01T09:52:05","date_gmt":"2010-08-01T01:52:05","guid":{"rendered":"http:\/\/blog.jixin.ntxz.net\/?p=1203"},"modified":"2010-08-01T09:52:05","modified_gmt":"2010-08-01T01:52:05","slug":"jquery%e5%9f%ba%e7%a1%80%e6%95%99%e7%a8%8b%e4%ba%8c%e4%bc%b8%e7%bc%a9%e3%80%81%e9%9a%94%e8%a1%8c%e5%8f%98%e8%89%b2-2","status":"publish","type":"post","link":"http:\/\/www.ntxz.net\/?p=1203","title":{"rendered":"jquery\u57fa\u7840\u6559\u7a0b\u4e8c[\u4f38\u7f29\u3001\u9694\u884c\u53d8\u8272&#8230;]"},"content":{"rendered":"<p>Demo_5\uff1a\u6536\u7f29\u5c55\u5f00\u529f\u80fd[\u5982\u65e0\u6cd5\u8fd0\u884c\u8bf7\u591a\u5237\u65b0\u51e0\u6b21\u6216\u4fdd\u5b58\u5230\u672c\u5730\u8fd0\u884c]<\/p>\n<div class=\"runcode\">\n<p><textarea name=\"runcode\" style=\"overflow-y:visible;width:600px;font-size:12px\" class=\"runcode_text\" id=\"runcode_HjFyvA\">\r\n&lt;!DOCTYPE html PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot; &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&quot;&gt;\r\n&lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=gb2312&quot; \/&gt;\r\n&lt;title&gt;\u53ef\u4f38\u7f29\u5757&lt;\/title&gt;\r\n&lt;style type=&quot;text\/css&quot;&gt;\r\np,div{margin:0;padding:0; font-size: 12px;}\r\n.box {float: left; margin-left: 20px; dipaly:inline;}\r\n.title1,.title2,.title3{width:280px;background:#cf0;height:20px;line-height: 20px;border:1px solid #aaa; text-align:center;}\r\n.content1,.content2,.content3{width:260px;height:350px;border:1px solid #aaa;border-top:none;padding: 10px;}\r\n&lt;\/style&gt;\r\n&lt;script type='text\/javascript' src=&quot;http:\/\/leotheme.cn\/wp-includes\/js\/jquery\/jquery.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script type=&quot;text\/javascript&quot;&gt;\r\n$(document).ready(function(){\r\n\t$(&quot;.title1&quot;).click(function(){$(&quot;.content1&quot;).slideDown(&quot;slow&quot;);});\r\n\t$(&quot;.title2&quot;).click(function(){$(&quot;.content2&quot;).slideUp(&quot;slow&quot;);});\r\n\t$(&quot;.title3&quot;).click(function(){$(&quot;.content3&quot;).slideToggle(&quot;slow&quot;);});\r\n});\r\n&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n&lt;p class=&quot;title1&quot;&gt;slideDown&lt;\/p&gt;\r\n&lt;div class=&quot;content1&quot;&gt;\r\n\u901a\u8fc7\u9ad8\u5ea6\u53d8\u5316\uff08\u5411\u4e0b\u589e\u5927\uff09\u6765\u52a8\u6001\u5730\u663e\u793a\u6240\u6709\u5339\u914d\u7684\u5143\u7d20\uff0c\u5728\u663e\u793a\u5b8c\u6210\u540e\u53ef\u9009\u5730\u89e6\u53d1\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\u3002\r\n\u8fd9\u4e2a\u52a8\u753b\u6548\u679c\u53ea\u8c03\u6574\u5143\u7d20\u7684\u9ad8\u5ea6\uff0c\u53ef\u4ee5\u4f7f\u5339\u914d\u7684\u5143\u7d20\u4ee5\u201c\u6ed1\u52a8\u201d\u7684\u65b9\u5f0f\u663e\u793a\u51fa\u6765\u3002\r\nspeed (String,Number) : \u4e09\u79cd\u9884\u5b9a\u901f\u5ea6\u4e4b\u4e00\u7684\u5b57\u7b26\u4e32(&quot;slow&quot;, &quot;normal&quot;, or &quot;fast&quot;)\u6216\u8868\u793a\u52a8\u753b\u65f6\u957f\u7684\u6beb\u79d2\u6570\u503c(\u5982\uff1a1000)\r\n&lt;\/div&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n&lt;p class=&quot;title2&quot;&gt;slideUp&lt;\/p&gt;\r\n&lt;div class=&quot;content2&quot;&gt;\r\n\u901a\u8fc7\u9ad8\u5ea6\u53d8\u5316\uff08\u5411\u4e0a\u51cf\u5c0f\uff09\u6765\u52a8\u6001\u5730\u9690\u85cf\u6240\u6709\u5339\u914d\u7684\u5143\u7d20\uff0c\u5728\u9690\u85cf\u5b8c\u6210\u540e\u53ef\u9009\u5730\u89e6\u53d1\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\u3002\r\n\u8fd9\u4e2a\u52a8\u753b\u6548\u679c\u53ea\u8c03\u6574\u5143\u7d20\u7684\u9ad8\u5ea6\uff0c\u53ef\u4ee5\u4f7f\u5339\u914d\u7684\u5143\u7d20\u4ee5\u201c\u6ed1\u52a8\u201d\u7684\u65b9\u5f0f\u9690\u85cf\u8d77\u6765\u3002\r\nspeed (String,Number) : \u4e09\u79cd\u9884\u5b9a\u901f\u5ea6\u4e4b\u4e00\u7684\u5b57\u7b26\u4e32(&quot;slow&quot;, &quot;normal&quot;, or &quot;fast&quot;)\u6216\u8868\u793a\u52a8\u753b\u65f6\u957f\u7684\u6beb\u79d2\u6570\u503c(\u5982\uff1a1000)\r\n&lt;\/div&gt; &lt;\/div&gt;\r\n&lt;div class=&quot;box&quot;&gt;\r\n&lt;p class=&quot;title3&quot;&gt;slideToggle&lt;\/p&gt;\r\n&lt;div class=&quot;content3&quot;&gt;\r\n\u901a\u8fc7\u9ad8\u5ea6\u53d8\u5316\u6765\u5207\u6362\u6240\u6709\u5339\u914d\u5143\u7d20\u7684\u53ef\u89c1\u6027\uff0c\u5e76\u5728\u5207\u6362\u5b8c\u6210\u540e\u53ef\u9009\u5730\u89e6\u53d1\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\u3002\r\n\u8fd9\u4e2a\u52a8\u753b\u6548\u679c\u53ea\u8c03\u6574\u5143\u7d20\u7684\u9ad8\u5ea6\uff0c\u53ef\u4ee5\u4f7f\u5339\u914d\u7684\u5143\u7d20\u4ee5\u201c\u6ed1\u52a8\u201d\u7684\u65b9\u5f0f\u9690\u85cf\u6216\u663e\u793a\u3002\r\nspeed (String,Number) : \u4e09\u79cd\u9884\u5b9a\u901f\u5ea6\u4e4b\u4e00\u7684\u5b57\u7b26\u4e32(&quot;slow&quot;, &quot;normal&quot;, or &quot;fast&quot;)\u6216\u8868\u793a\u52a8\u753b\u65f6\u957f\u7684\u6beb\u79d2\u6570\u503c(\u5982\uff1a1000)\r\n&lt;\/div&gt; &lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/textarea><\/p>\n<script type=\"text\/javascript\">function changeTsize(){document.getElementById(\"runcode_HjFyvA\").style.height = document.getElementById(\"runcode_HjFyvA\").scrollHeight + \"px\";}window.setTimeout(changeTsize,0);<\/script><p><input type=\"button\" value=\"\u8fd0\u884c\" class=\"runcode_button\" onclick=\"runcode_open_new('runcode_HjFyvA');\"\/> <input type=\"button\" value=\"\u590d\u5236\" class=\"runcode_button\" onclick=\"runcode_copy('runcode_HjFyvA');\"\/> <input type=\"button\" value=\"\u53e6\u5b58\u4ee3\u7801\" class=\"runcode_button\" onclick=\"saveCode('runcode_HjFyvA','runcode_HjFyvA');\"\/> \u63d0\u793a\uff1a\u4f60\u53ef\u4ee5\u5148\u4fee\u6539\u90e8\u5206\u4ee3\u7801\u518d\u8fd0\u884c\u3002<\/p>\n<\/div>\n<p>\u901a\u8fc7\u8fd9\u4e2a\u4f8b\u5b50\uff0c\u4f60\u5c31\u80fd\u505a\u50cf\u6211\u4fa7\u8fb9\u680f\u7684\u6536\u7f29\u6548\u679c\u4e86\uff0c\u800c\u4e14\u5f88\u7b80\u5355\uff0c\u4e00\u884c\u4ee3\u7801\u5c31\u884c\u4e86\uff0c\u600e\u4e48\u6837\uff1f<\/p>\n<p>\u4e0b\u9762\u6211\u4eec\u518d\u6765\u770b\u4e00\u4e2a\u5f88\u5b9e\u7528\u7684\u4f8b\u5b50<br \/>\nDemo_7\uff1a\u9694\u884c\u53d8\u8272, \u9f20\u6807\u6ed1\u8fc7\u53d8\u8272\uff0c\u70b9\u51fb\u53d8\u8272<\/p>\n<div class=\"runcode\">\n<p><textarea name=\"runcode\" style=\"overflow-y:visible;width:600px;font-size:12px\" class=\"runcode_text\" id=\"runcode_bMcNlk\">\r\n&lt;!DOCTYPE html PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot; &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&quot;&gt;\r\n&lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=gb2312&quot; \/&gt;\r\n&lt;title&gt;StripingTable&lt;\/title&gt;\r\n&lt;script type='text\/javascript' src=&quot;http:\/\/leotheme.cn\/wp-includes\/js\/jquery\/jquery.js&quot;&gt;&lt;\/script&gt;\r\n&lt;!--\u5c06jQuery\u5f15\u7528\u8fdb\u6765--&gt;\r\n&lt;script type=&quot;text\/javascript&quot;&gt;\r\n$(document).ready(function(){\r\n     $(&quot;.stripe li:even&quot;).addClass(&quot;alt&quot;);\r\n     \/\/\u7ed9class\u4e3astripe\u7684\u5217\u8868\u7684\u5076\u6570\u884c\u6dfb\u52a0class\u503c\u4e3aalt\r\n\t $(&quot;.stripe2 li&quot;).mouseover(function(){\r\n     \/\/\u5982\u679c\u9f20\u6807\u79fb\u5230class\u4e3astripe\u7684\u5217\u8868\u7684li\u4e0a\u65f6\uff0c\u6267\u884c\u51fd\u6570\r\n     $(this).addClass(&quot;over&quot;);}).mouseout(function(){\r\n     \/\/\u7ed9\u8fd9\u884c\u6dfb\u52a0class\u503c\u4e3aover\uff0c\u5e76\u4e14\u5f53\u9f20\u6807\u4e00\u51fa\u8be5\u884c\u65f6\u6267\u884c\u51fd\u6570\r\n     $(this).removeClass(&quot;over&quot;);}); \/\/\u79fb\u9664\u8be5\u884c\u7684class\r\n\t $(&quot;.stripe3 li&quot;).click(function(){\r\n\t $(this).toggleClass(&quot;alt&quot;);});\/\/\u70b9\u51fb\u53d8\u8272,\u6ce8\u610f\uff1a\u56e0\u4e3a\u6709\u9694\u884c\u53d8\u8272\uff0c\u6240\u4ee5\u8fd9\u91cc\u5fc5\u987b\u5728\u89e6\u53d1toggleClass\u65f6,remove(&quot;alt&quot;).\r\n});\r\n&lt;\/script&gt;\r\n&lt;style&gt;\r\nbody {\r\n\t\tmargin: 0 auto;\r\n\t\ttext-align: center;\r\n}\r\nul {\r\n\t\twidth: 500px;\r\nmargin: 0 auto;\r\n\t\ttext-align:left;\r\n        list-style: none;\r\n\t\tborder: 1px solid #c2c2c2;\r\n\t\tborder-bottom:none;\r\n\t\tmargin-top: 10px;\r\n}\r\nli {\r\n        padding:6px;\r\n\t\tborder-bottom: 1px solid #c2c2c2;\r\n}\r\n.alt {\r\n        background:#ecf6fc;  \/*\u8fd9\u884c\u5c06\u7ed9\u6240\u6709\u7684li\u52a0\u4e0a\u80cc\u666f\u8272*\/\r\n}\r\n.over {\r\n        background:#bcd4ec;  \/*\u8fd9\u4e2a\u5c06\u662f\u9f20\u6807\u9ad8\u4eae\u884c\u7684\u80cc\u666f\u8272*\/\r\n}\r\n.click{background:yellow;}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;ul class=&quot;stripe&quot;&gt;\r\n&lt;li&gt;\u9694\u884c\u53d8\u8272&lt;\/li&gt;\r\n&lt;li&gt;Name \uff1aLouis&lt;\/li&gt;\r\n&lt;li&gt;E-mail\uff1ayltfy2008@gmail.com&lt;\/li&gt;\r\n&lt;li&gt;Q    Q\uff1a214227707&lt;\/li&gt;\r\n&lt;li&gt;WWW\uff1ahttp:\/\/leotheme.cn\/&lt;\/li&gt;\r\n&lt;li&gt;\u2026\u2026&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;ul class=&quot;stripe2&quot;&gt;\r\n&lt;li&gt;\u9f20\u6807\u6ed1\u8fc7\u53d8\u8272&lt;\/li&gt;\r\n&lt;li&gt;Name \uff1aLouis&lt;\/li&gt;\r\n&lt;li&gt;E-mail\uff1ayltfy2008@gmail.com&lt;\/li&gt;\r\n&lt;li&gt;Q    Q\uff1a214227707&lt;\/li&gt;\r\n&lt;li&gt;WWW\uff1ahttp:\/\/leotheme.cn\/&lt;\/li&gt;\r\n&lt;li&gt;\u2026\u2026&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;ul class=&quot;stripe3&quot;&gt;\r\n&lt;li&gt;\u70b9\u51fb\u53d8\u8272&lt;\/li&gt;\r\n&lt;li&gt;Name \uff1aLouis&lt;\/li&gt;\r\n&lt;li&gt;E-mail\uff1ayltfy2008@gmail.com&lt;\/li&gt;\r\n&lt;li&gt;Q    Q\uff1a214227707&lt;\/li&gt;\r\n&lt;li&gt;WWW\uff1ahttp:\/\/leotheme.cn\/&lt;\/li&gt;\r\n&lt;li&gt;\u2026\u2026&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/textarea><\/p>\n<script type=\"text\/javascript\">function changeTsize(){document.getElementById(\"runcode_bMcNlk\").style.height = document.getElementById(\"runcode_bMcNlk\").scrollHeight + \"px\";}window.setTimeout(changeTsize,0);<\/script><p><input type=\"button\" value=\"\u8fd0\u884c\" class=\"runcode_button\" onclick=\"runcode_open_new('runcode_bMcNlk');\"\/> <input type=\"button\" value=\"\u590d\u5236\" class=\"runcode_button\" onclick=\"runcode_copy('runcode_bMcNlk');\"\/> <input type=\"button\" value=\"\u53e6\u5b58\u4ee3\u7801\" class=\"runcode_button\" onclick=\"saveCode('runcode_bMcNlk','runcode_bMcNlk');\"\/> \u63d0\u793a\uff1a\u4f60\u53ef\u4ee5\u5148\u4fee\u6539\u90e8\u5206\u4ee3\u7801\u518d\u8fd0\u884c\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Demo_5\uff1a\u6536\u7f29\u5c55\u5f00\u529f\u80fd[\u5982\u65e0\u6cd5\u8fd0\u884c\u8bf7\u591a\u5237\u65b0\u51e0\u6b21\u6216\u4fdd\u5b58\u5230\u672c\u5730\u8fd0\u884c] &lt;!DOCTYPE html PU [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[36,51,54],"class_list":["post-1203","post","type-post","status-publish","format-standard","hentry","category-jquery-2","tag-jquery","tag-51","tag-54"],"views":402,"_links":{"self":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/1203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1203"}],"version-history":[{"count":0,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/1203\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1203"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}