﻿{"id":1190,"date":"2010-08-01T09:38:50","date_gmt":"2010-08-01T01:38:50","guid":{"rendered":"http:\/\/blog.jixin.ntxz.net\/?p=1190"},"modified":"2010-08-01T09:38:50","modified_gmt":"2010-08-01T01:38:50","slug":"jquery-%e5%ae%9e%e7%8e%b0-tab-%e5%88%87%e6%8d%a2%e4%b8%80%e4%be%8b-2","status":"publish","type":"post","link":"http:\/\/www.ntxz.net\/?p=1190","title":{"rendered":"jQuery \u5b9e\u73b0 tab \u5207\u6362\u4e00\u4f8b"},"content":{"rendered":"<p>\u5bf9\u4e8eTab\u5207\u6362\uff0c\u6211\u60f3\u5927\u5bb6\u90fd\u4e0d\u964c\u751f\u4e86\u3002\u73b0\u5728\u51e0\u4e4e\u662f\u5230\u5904\u53ef\u89c1\u4e86\uff1b\u4eca\u5929\u4e3a\u5927\u5bb6\u4ecb\u7ecd\u4e0b\u600e\u4e48\u7528jQuery\u6765\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684Tab\u5207\u6362\u6548\u679c\u3002\u5176\u5b9e\u8fd9\u7c7b\u4f8b\u5b50\u7f51\u4e0a\u4e5f\u6709\u5f88\u591a\u4e86\uff0c\u5728\u8fd9\u91cc\u4e0d\u8ba8\u8bba\u5b83\u7684\u5b9e\u73b0\u539f\u7406\uff0c\u56e0\u4e3a\u90fd\u662f\u4e9b\u6700\u57fa\u672c\u7684\u5e94\u7528\u800c\u5df2\u3002\u6ca1\u4ec0\u4e48\u53ef\u7814\u7a76\u7684\uff1b\u5173\u5065\u8fd8\u5728\u4e8e\u600e\u6837\u7075\u6d3b\u8fd0\u7528\u3002\u8fbe\u5230\u4e3e\u4e00\u53cd\u4e09\u7684\u6548\u679c\uff1b<br \/>\n\u5148\u770b\u4e0b\u6548\u679c\u56fe\uff1b<br \/>\n<a href=\"http:\/\/blog.jixin.ntxz.net\/wp-content\/uploads\/2010\/08\/jQuerytab.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.jixin.ntxz.net\/wp-content\/uploads\/2010\/08\/jQuerytab-300x123.png\" alt=\"\" title=\"jQuerytab\" width=\"300\" height=\"123\" class=\"alignnone size-medium wp-image-1191\" srcset=\"http:\/\/www.ntxz.net\/wp-content\/uploads\/2010\/08\/jQuerytab-300x123.png 300w, http:\/\/www.ntxz.net\/wp-content\/uploads\/2010\/08\/jQuerytab.png 494w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u4e0b\u9762\u6211\u5c31\u4e0d\u505a\u6ce8\u91ca\u4e86\uff0c\u76f4\u63a5\u8d34\u4ee3\u7801\u4e86\u3002<\/p>\n<div class=\"runcode\">\n<p><textarea name=\"runcode\" style=\"overflow-y:visible;width:600px;font-size:12px\" class=\"runcode_text\" id=\"runcode_7PCcIA\">\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=utf-8&quot; \/&gt;\r\n&lt;title&gt;jQuery Tabs By Await http:\/\/leotheme.cn\/&lt;\/title&gt;\r\n&lt;style&gt;\r\n* { margin:0 auto; padding:0; font-family:&quot;\u5b8b\u4f53&quot;,Arial, Helvetica, sans-serif; font-size:12px; }\r\nul { list-style: none;}\r\np {width: 450px; border:1px solid #88AAD6; padding: 5px 10px; text-align: right;}\r\n.tabbox{ position: relative; width:450px; height: 140px; margin:0 auto; border:1px solid #88AAD6; margin-top: 100px; padding: 10px;}\r\n.tabnavi { position: relative; left: 0; top: 0; z-index: 999; float: left;}\r\n.tabnavi li{ width:80px; height:24px; font-weight:bold; line-height: 24px; margin: 10px 0; border:1px solid #88AAD6; background:#eeeeff; color:#999; text-align:center;}\r\n.tabnavi li.current{ background:#fff; border-right: 1px solid #fff; color:#290052; }\r\n.tabContent{ position: relative; z-index: 99;float:left; margin-left: -1px; border:1px solid #88AAD6; padding:10px; width:347px; height:120px; }\r\n.clear {clear: both;}\r\n&lt;\/style&gt;\r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/leotheme.cn\/wp-includes\/js\/jquery\/jquery.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script&gt;\r\n$(function(){\r\n   $(&quot;.tabContent div:not(:first)&quot;).hide();\r\n   $(&quot;.tabnavi li&quot;).each(function(index){\r\n       $(this).click(\r\n\t   \t  function(){\r\n\t\t\t  $(&quot;.tabnavi li.current&quot;).removeClass(&quot;current&quot;);\r\n\t\t\t  $(this).addClass(&quot;current&quot;);\r\n\t\t\t  $(&quot;.tabContent &gt; div:visible&quot;).hide();\r\n\t\t\t  $(&quot;.tabContent div:eq(&quot; + index + &quot;)&quot;).show();\r\n\t  })\r\n   })\r\n})\r\n&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=&quot;tabbox&quot;&gt;\r\n\t&lt;ul class=&quot;tabnavi&quot;&gt;\r\n\t\t&lt;li class=&quot;current&quot;&gt;\u9996\u9875&lt;\/li&gt;\r\n\t\t&lt;li&gt;\u5173\u4e8e&lt;\/li&gt;\r\n\t\t&lt;li&gt;\u76f8\u518c&lt;\/li&gt;\r\n\t&lt;\/ul&gt;\r\n\t&lt;div class=&quot;tabContent&quot;&gt;\r\n\t\t&lt;div&gt;http:\/\/leotheme.cn\/&lt;\/div&gt;\r\n\t\t&lt;div&gt;http:\/\/leotheme.cn\/about&lt;\/div&gt;\r\n\t\t&lt;div&gt;http:\/\/leotheme.cn\/photo&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n\t&lt;div class=&quot;clear&quot;&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;p&gt;By Await 2009:06:11&lt;\/p&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_7PCcIA\").style.height = document.getElementById(\"runcode_7PCcIA\").scrollHeight + \"px\";}window.setTimeout(changeTsize,0);<\/script><p><input type=\"button\" value=\"\u8fd0\u884c\" class=\"runcode_button\" onclick=\"runcode_open_new('runcode_7PCcIA');\"\/> <input type=\"button\" value=\"\u590d\u5236\" class=\"runcode_button\" onclick=\"runcode_copy('runcode_7PCcIA');\"\/> <input type=\"button\" value=\"\u53e6\u5b58\u4ee3\u7801\" class=\"runcode_button\" onclick=\"saveCode('runcode_7PCcIA','runcode_7PCcIA');\"\/> \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>\u5bf9\u4e8eTab\u5207\u6362\uff0c\u6211\u60f3\u5927\u5bb6\u90fd\u4e0d\u964c\u751f\u4e86\u3002\u73b0\u5728\u51e0\u4e4e\u662f\u5230\u5904\u53ef\u89c1\u4e86\uff1b\u4eca\u5929\u4e3a\u5927\u5bb6\u4ecb\u7ecd\u4e0b\u600e\u4e48\u7528jQuery\u6765\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684T [&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,56],"class_list":["post-1190","post","type-post","status-publish","format-standard","hentry","category-jquery-2","tag-jquery","tag-tab"],"views":504,"_links":{"self":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/1190","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=1190"}],"version-history":[{"count":1,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/1190\/revisions"}],"predecessor-version":[{"id":1192,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/1190\/revisions\/1192"}],"wp:attachment":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1190"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}