{"id":630,"date":"2008-11-09T23:11:14","date_gmt":"2008-11-09T15:11:14","guid":{"rendered":"http:\/\/fdream.net\/blog\/article\/630.aspx"},"modified":"2008-11-09T23:11:24","modified_gmt":"2008-11-09T15:11:24","slug":"Mootools+1.2%e6%95%99%e7%a8%8b(17)%e2%80%94%e2%80%94%e6%89%8b%e9%a3%8e%e7%90%b4%e6%8f%92%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/fdream.net\/blog\/article\/630","title":{"rendered":"Mootools 1.2\u6559\u7a0b(17)\u2014\u2014\u624b\u98ce\u7434\u63d2\u4ef6"},"content":{"rendered":"<h2>Mootools 1.2\u624b\u98ce\u7434\uff08Accordion\uff09\u6559\u7a0b<\/h2>\n<p>\u539f\u6587\u5730\u5740\uff1a<a href=\"http:\/\/www.consideropen.com\/blog\/2008\/09\/30-days-of-mootools-12-tutorials-day-17-accordion\/\" target=\"_blank\" title=\"30 Days of Mootools 1.2 Tutorials - Day 17 - Accordion\">30 Days of Mootools 1.2 Tutorials &#8211; Day 17 &#8211; Accordion<\/a><\/p>\n<p>\u8bf7\u5c0a\u91cd\u4e2a\u4eba\u52b3\u52a8\uff0c\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\uff1ahttp:\/\/fdream.net\uff0c\u8bd1\u8005\uff1aFdream<\/p>\n<p>\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u51c6\u5907\u597d\u5f00\u59cb\u8fd9\u4e00\u8bb2\uff0c\u8bf7\u53c2\u8003\u8fd9\u4e00\u7cfb\u5217\u7684\u6559\u7a0b\uff0c\u8fd9\u91cc\u662f<a href=\"http:\/\/fdream.net\/blog\/article\/605.aspx\" target=\"_blank\" title=\"\u300aMooTools 1.2\u7cfb\u5217\u6559\u7a0b\u76ee\u5f55\u300b\">\u300aMooTools 1.2\u7cfb\u5217\u6559\u7a0b\u76ee\u5f55\u300b<\/a>\u3002<\/p>\n<p>\u7ee7\u7eed\u6211\u4eec\u7684\u201c\u66f4\u591a\u201d\uff08More\uff09\u5e93\u91cc\u9762\u7684\u63d2\u4ef6\u6559\u7a0b\uff0c\u4eca\u5929\u6211\u4eec\u6765\u5b66\u4e60\u4e00\u4e0b\u53ef\u80fd\u662f\u6700\u6d41\u884c\u6700\u53d7\u6b22\u8fce\u7684\u63d2\u4ef6\u2014\u2014\u624b\u98ce\u7434\u3002\u521b\u5efa\u548c\u914d\u7f6e\u4e00\u4e2a\u57fa\u672c\u7684\u624b\u98ce\u7434\u5f88\u7b80\u5355\uff0c\u4f46\u662f\u4f60\u4e00\u5b9a\u8981\u8ba4\u771f\u770b\u5b8c\u5168\u6587\uff0c\u56e0\u4e3a\u66f4\u591a\u7684\u9ad8\u7ea7\u9009\u9879\u53ef\u80fd\u6709\u4e00\u4e9b\u590d\u6742\u3002<\/p>\n<h3>\u57fa\u7840\u77e5\u8bc6<\/h3>\n<h4>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u624b\u98ce\u7434<\/h4>\n<p>\u8981\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u624b\u98ce\u7434\uff0c\u4f60\u9700\u8981\u9009\u62e9\u4e00\u4e9b\u6210\u5bf9\u7684\u5143\u7d20\u2014\u2014\u5305\u542b\u6807\u9898\u548c\u5185\u5bb9\u3002\u56e0\u6b64\uff0c\u9996\u5148\uff0c\u9700\u8981\u7ed9\u6bcf\u4e00\u4e2a\u6807\u9898\u548c\u6bcf\u4e00\u4e2a\u5185\u5bb9\u5757\u5206\u522b\u6307\u5b9a\u4e00\u4e2acss\u7c7b\u540d\uff1a<\/p>\n<p><pre lang=\"html\">\n&lt;h3 class=&quot;togglers&quot;&gt;Toggle 1&lt;\/h3&gt;\n&lt;p class=&quot;elements&quot;&gt;Here is the content of toggle 1&lt;\/p&gt;\n&lt;h3 class=&quot;togglers&quot;&gt;Toggle 2&lt;\/h3&gt;\n&lt;p class=&quot;elements&quot;&gt;Here is the content of toggle 2&lt;\/p&gt;\n<\/pre>\n<\/p>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u9009\u62e9\u6240\u6709css\u7c7b\u540d\u4e3a\u201ctogglers\u201d\u548c\u6240\u6709css\u7c7b\u540d\u4e3a\u201celements\u201d\u7684\u5143\u7d20\uff0c\u5e76\u628a\u5b83\u4eec\u8d4b\u503c\u7ed9\u53d8\u91cf\uff0c\u7136\u540e\u521d\u59cb\u5316\u4e00\u4e2a\u624b\u98ce\u7434\u5bf9\u8c61\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar toggles = $$('.togglers');\nvar content = $$('.elements');\n \n\/\/ \u521b\u5efa\u4f60\u7684\u5bf9\u8c61\u53d8\u91cf\n\/\/ \u4f7f\u7528\u201cnew\u201d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u624b\u98ce\u7434\u5bf9\u8c61\n\/\/ \u8bbe\u7f6e\u5f00\u5173\uff08toogle\uff09\u6570\u7ec4\n\/\/ \u8bbe\u7f6e\u5185\u5bb9\u6570\u7ec4\nvar AccordionObject = new Accordion(toggles, content);\n<\/pre>\n<\/p>\n<p>\u624b\u98ce\u7434\u7684\u9ed8\u8ba4\u8bbe\u7f6e\u7ed9\u4f60\u7684\u6548\u679c\u53ef\u80fd\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n<p>\n<script type=\"text\/javascript\">\nwindow.addEvent('domready', function() {\nvar togglesA = $$('.togglersA');\nvar contentA = $$('.elementsA');\nvar AccordionObject = new Accordion(togglesA, contentA);\n});\n<\/script><\/p>\n<h5 class=\"togglersA\">Toggle 1<\/h5>\n<p class=\"elementsA\">Here is the content of toggle 1<\/p>\n<h5 class=\"togglersA\">Toggle 2<\/h5>\n<p class=\"elementsA\">Here is the content of toggle 2<\/p>\n<h5 class=\"togglersA\">Toggle 3<\/h5>\n<p class=\"elementsA\">Here is the content of toggle 3<\/p>\n<\/p>\n<h3>\u9009\u9879<\/h3>\n<p>\u5f53\u7136\uff0c\u5982\u679c\u4f60\u60f3\u8981\u624b\u98ce\u7434\u9ed8\u8ba4\u6548\u679c\u4ee5\u5916\u7684\u4e1c\u897f\uff0c\u4f60\u9700\u8981\u8c03\u6574\u4e00\u4e0b\u9009\u9879\u3002\u5728\u8fd9\u91cc\u6211\u4eec\u5c06\u9010\u4e2a\u8bb2\u89e3\u3002<\/p>\n<h4>display<\/h4>\n<p>\u9ed8\u8ba4\u4e3a0<\/p>\n<p>\u8fd9\u4e2a\u9009\u9879\u51b3\u5b9a\u4e86\u5f53\u9875\u9762\u52a0\u8f7d\u540e\u54ea\u4e2a\u5143\u7d20\u4f1a\u663e\u793a\u51fa\u6765\u3002\u9ed8\u8ba4\u503c\u4e3a0\uff0c\u56e0\u6b64\u7b2c\u4e00\u4e2a\u5143\u7d20\u4f1a\u663e\u793a\u51fa\u6765\u3002\u5982\u679c\u8981\u8bbe\u7f6e\u4e3a\u5176\u4ed6\u5143\u7d20\uff0c\u53ea\u9700\u8981\u8bbe\u7f6e\u4e3a\u53e6\u5916\u4e00\u4e2a\u5143\u7d20\u7684\u7d22\u5f15\u503c\uff08\u4e3a\u6574\u6570\uff09\u5c31\u53ef\u4ee5\u4e86\u3002\u548c\u201cshow\u201d\u4e0d\u4e00\u6837\uff0c\u201cdisplay\u201d\u5c06\u4f1a\u4f7f\u7528\u6e10\u53d8\u52a8\u753b\u8ba9\u5143\u7d20\u5c55\u5f00\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    display: 0 \/\/ \u9ed8\u8ba4\u4e3a0\n});\n<\/pre>\n<\/p>\n<h4>show<\/h4>\n<p>\u9ed8\u8ba4\u4e3a0<\/p>\n<p>\u548c\u201cdisplay\u201d\u975e\u5e38\u7c7b\u4f3c\uff0c\u201cshow\u201d\u51b3\u5b9a\u4e86\u5f53\u9875\u9762\u52a0\u8f7d\u540e\u90a3\u4e2a\u5143\u7d20\u5c06\u4f1a\u5c55\u5f00\uff0c\u4e0d\u8fc7\u5b83\u6ca1\u6709\u6e10\u53d8\u52a8\u753b\uff0c\u5b83\u53ea\u662f\u5728\u9875\u9762\u52a0\u8f7d\u540e\u663e\u793a\u51fa\u6765\uff0c\u800c\u4e0d\u4f7f\u7528\u4efb\u4f55\u6e10\u53d8\u52a8\u753b\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    display: 0 \/\/ \u9ed8\u8ba4\u4e3a0\n});\n<\/pre>\n<\/p>\n<h4>height<\/h4>\n<p>\u9ed8\u8ba4\u4e3atrue<\/p>\n<p>\u5f53\u8bbe\u7f6e\u4e3atrue\uff0c\u5185\u5bb9\u663e\u793a\u65f6\uff0c\u5c06\u6709\u9ad8\u5ea6\u6e10\u53d8\u52a8\u753b\u6548\u679c\u3002\u8fd9\u548c\u4f60\u4e0a\u9762\u770b\u5230\u7684\u4e00\u6837\uff0c\u662f\u4e00\u4e2a\u6807\u51c6\u7684\u624b\u98ce\u7434\u8bbe\u7f6e\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    height: true \/\/ \u9ed8\u8ba4\u4e3atrue\n});\n<\/pre>\n<\/p>\n<h4>width<\/h4>\n<p>\u9ed8\u8ba4\u4e3afalse<\/p>\n<p>\u548c\u201cheight\u201d\u7c7b\u4f3c\uff0c\u4e0d\u8fc7\u4e0d\u662f\u4f7f\u7528\u9ad8\u5ea6\u6e10\u53d8\u52a8\u753b\u6765\u663e\u793a\u5185\u5bb9\uff0c\u800c\u662f\u4f7f\u7528\u5bbd\u5ea6\u6e10\u53d8\u52a8\u753b\u6765\u663e\u793a\u5185\u5bb9\u3002\u5982\u679c\u4f60\u628a\u201cwidth\u201d\u9009\u9879\u548c\u5176\u4ed6\u6211\u4eec\u770b\u5230\u7684\u6807\u51c6\u8bbe\u7f6e\u4e00\u8d77\u4f7f\u7528\uff0c\u5404\u4e2a\u6807\u9898\u5f00\u5173\u4e4b\u95f4\u7684\u8ddd\u79bb\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u8fd9\u4e2a\u8ddd\u79bb\u5b8c\u5168\u57fa\u4e8e\u5185\u5bb9\u7684\u9ad8\u5ea6\u3002\u5185\u5bb9\u7684div\u5c06\u4f1a\u4ece\u5de6\u5230\u53f3\uff0c\u5bbd\u5ea6\u9010\u6e10\u53d8\u5bbd\u6765\u663e\u793a\u5185\u5bb9\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    width: false \/\/ \u9ed8\u8ba4\u4e3afalse \n});\n<\/pre>\n<\/p>\n<h4>opacity<\/h4>\n<p>\u9ed8\u8ba4\u4e3atrue<\/p>\n<p>\u8fd9\u4e2a\u9009\u9879\u8bbe\u7f6e\u4e86\u5f53\u4f60\u9690\u85cf\u6216\u8005\u663e\u793a\u5185\u5bb9\u65f6\uff0c\u662f\u5426\u4f7f\u7528\u4e0d\u900f\u660e\u5ea6\u6e10\u53d8\u6548\u679c\u3002\u7531\u4e8e\u6211\u4eec\u5728\u4e0a\u9762\u4f7f\u7528\u4e86\u9ed8\u8ba4\u8bbe\u7f6e\uff0c\u6240\u4ee5\u4f60\u53ef\u4ee5\u770b\u5230\u6548\u679c\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    opacity: true \/\/ \u9ed8\u8ba4\u4e3atrue\n});\n<\/pre>\n<\/p>\n<h4>fixedHeight<\/h4>\n<p>\u9ed8\u8ba4\u4e3afalse<\/p>\n<p>\u8981\u8bbe\u7f6e\u4e00\u4e2a\u56fa\u5b9a\u7684\u9ad8\u5ea6\uff0c\u4f60\u53ef\u4ee5\u5728\u8fd9\u91cc\u8bbe\u7f6e\u4e00\u4e2a\u6574\u6570\uff08\u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u8bbe\u7f6e100\uff0c\u4ece\u800c\u53ef\u4ee5\u4f7f\u5f97\u5185\u5bb9\u7684\u9ad8\u5ea6\u4e3a100px\uff09\u3002\u5982\u679c\u4f60\u51c6\u5907\u8bbe\u7f6e\u7684\u9ad8\u5ea6\u5c0f\u4e8e\u5185\u5bb9\u7684\u9ad8\u5ea6\uff0c\u5728\u8fd9\u91cc\u4f60\u9700\u8981\u5728CSS\u4e2d\u8bbe\u7f6e\u4e00\u4e0b\u5185\u5bb9\u7684overflow\u5c5e\u6027\u3002\u548c\u4f60\u53ef\u80fd\u7684\u671f\u671b\u4e00\u6837\uff0c\u5f53\u4f60\u4f7f\u7528\u201cshow\u201d\u9009\u9879\u65f6\uff0c\u5f53\u9875\u9762\u7b2c\u4e00\u6b21\u8f7d\u5165\u65f6\uff0c\u5b83\u662f\u4e0d\u4f1a\u751f\u6548\uff08\u88ab\u6ce8\u518c\uff09\u7684\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    fixedHeight: false \/\/ \u9ed8\u8ba4\u4e3afalse\n});\n<\/pre>\n<\/p>\n<h4>fixedWidth<\/h4>\n<p>\u9ed8\u8ba4\u4e3afalse<\/p>\n<p>\u548c\u4e0a\u9762\u7684\u201cfixedHeight\u201d\u7c7b\u4f3c\uff0c\u5982\u679c\u4f60\u7ed9\u4e86\u8fd9\u4e2a\u9009\u9879\u4e00\u4e2a\u6574\u6570\uff0c\u8fd9\u5c06\u8bbe\u7f6e\u5b83\u7684\u5bbd\u5ea6\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    fixedWidth: false \/\/ \u9ed8\u8ba4\u4e3afalse \n});\n<\/pre>\n<\/p>\n<h4>alwaysHide<\/h4>\n<p>\u9ed8\u8ba4\u4e3afalse<\/p>\n<p>\u8fd9\u4e2a\u9009\u9879\u53ef\u4ee5\u8ba9\u4f60\u7ed9\u6807\u9898\u589e\u52a0\u4e00\u4e2a\u5f00\u5173\u3002\u901a\u8fc7\u628a\u8fd9\u4e2a\u9009\u9879\u8bbe\u7f6e\u4e3atrue\uff0c\u5f53\u4f60\u70b9\u51fb\u4e00\u4e2a\u5185\u5bb9\u5df2\u7ecf\u5c55\u5f00\u7684\u6807\u9898\u65f6\uff0c\u5b83\u5c06\u5173\u95ed\u8fd9\u4e2a\u5185\u5bb9\u5757\uff0c\u4f46\u662f\u4e0d\u4f1a\u5c55\u5f00\u4efb\u4f55\u5143\u7d20\u3002\u4f60\u9a6c\u4e0a\u5c31\u53ef\u4ee5\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\u770b\u5230\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    alwaysHide: false \/\/ \u9ed8\u8ba4\u4e3afalse\n});\n<\/pre>\n<\/p>\n<h3>\u4e8b\u4ef6<\/h3>\n<h4>onActive<\/h4>\n<p>\u5f53\u4f60\u5f00\u5173\u4e00\u4e2a\u5143\u7d20\u65f6\u89e6\u53d1\u8fd9\u4e2a\u4e8b\u4ef6\u3002\u4ed6\u5c06\u4f1a\u4f20\u9012\u8fd9\u4e2a\u5f00\u5173\u63a7\u5236\u5143\u7d20\u548c\u5185\u5bb9\u5143\u7d20\uff0c\u8fd8\u6709\u5f00\u5173\u72b6\u6001\u4f5c\u4e3a\u53c2\u6570\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    onActive: function(toggler, element) {\n        toggler.highlight('#76C83D'); \/\/ \u7eff\u8272\n            element.highlight('#76C83D');\n    }\n});\n<\/pre>\n<\/p>\n<h4>onBackground<\/h4>\n<p>\u5f53ige\u5143\u7d20\u5f00\u59cb\u9690\u85cf\u65f6\u89e6\u53d1\u8fd9\u4e2a\u4e8b\u4ef6\uff0c\u5b83\u5c06\u4f20\u9012\u6240\u6709\u5176\u4ed6\u6b63\u5219\u5173\u95ed\u7684\u5143\u7d20\u4f5c\u4e3a\u53c2\u6570\uff0c\u800c\u4e0d\u662f\u5c55\u5f00\u7684\u5143\u7d20\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    onBackground: function(toggler, element) {\n        toggler.highlight('#DC4F4D'); \/\/ \u7ea2\u8272\n            element.highlight('#DC4F4D');    \n    }\n});\n<\/pre>\n<\/p>\n<h4>onComplete<\/h4>\n<p>\u8fd9\u662f\u4e00\u4e2a\u6807\u51c6\u7684onComplete\u4e8b\u4ef6\u3002\u5b83\u4f20\u9012\u4e00\u4e2a\u5305\u542b\u5185\u5bb9\u5143\u7d20\u7684\u53d8\u91cf\u3002\u8fd9\u91cc\u53c8\u4e00\u79cd\u66f4\u597d\u7684\u65b9\u5f0f\u83b7\u53d6\u8fd9\u4e9b\u4e1c\u897f\uff0c\u5982\u679c\u6709\u4eba\u77e5\u9053\uff0c\u53ef\u4ee5\u4f5c\u4e2a\u8bb0\u5f55\u3002<\/p>\n<p><pre lang=\"javascript\">\nvar AccordionObject = new Accordion(toggles, content { \n    onComplete: function(one, two, three, four){\n        one.highlight('#5D80C8'); \/\/ \u84dd\u8272\n            two.highlight('#5D80C8');\n            three.highlight('#5D80C8');\n            four.highlight('#5D80C8'); \n    }\n});\n<\/pre>\n<\/p>\n<h3>\u65b9\u6cd5<\/h3>\n<h4>.addSection();<\/h4>\n<p>\u901a\u8fc7\u8fd9\u4e2a\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u5728\u4e2d\u95f4\u6dfb\u52a0\u4e00\u8282\uff08\u4e00\u4e2a\u6807\u9898\/\u5185\u5bb9\u5143\u7d20\u5bf9\uff09\u3002\u8fd9\u4e2a\u6211\u4eec\u89c1\u8fc7\u7684\u8bb8\u591a\u5176\u4ed6\u65b9\u6cd5\u4e00\u6837\u3002\u9996\u5148\uff0c\u6211\u4eec\u5f15\u7528\u4e00\u4e2a\u624b\u98ce\u7434\u5bf9\u8c61\uff0c\u5728\u540e\u9762\u52a0\u4e0a.addSection\uff0c\u7136\u540e\u4f60\u53ef\u4ee5\u8c03\u7528\u6807\u9898\u7684id\u3001\u5185\u5bb9\u7684id\uff0c\u6700\u540e\u7ed9\u5b83\u6307\u5b9a\u4e00\u4e2a\u4f4d\u7f6e\u2014\u2014\u8fd9\u4e2a\u65b0\u5143\u7d20\u8981\u51fa\u73b0\u7684\u4f4d\u7f6e\uff080\u662f\u7b2c\u4e00\u4e2a\u4f4d\u7f6e\uff09\u3002<\/p>\n<p><pre lang=\"javascript\">\nAccordionObject.addSection('togglersID', 'elementsID', 2);\n<\/pre>\n<\/p>\n<p><b>\u6ce8\u610f\uff1a<\/b>\u5f53\u4f60\u901a\u8fc7\u8fd9\u4e2a\u65b9\u5f0f\u6dfb\u52a0\u4e00\u8282\uff0c\u867d\u7136\u5b83\u4f1a\u5728\u7d22\u5f15\u503c\u4e3a2\u7684\u5730\u65b9\u663e\u793a\uff0c\u4f46\u662f\u5b83\u7684\u771f\u5b9e\u7d22\u5f15\u5e94\u8be5\u662f\u6700\u540e\u4e00\u4e2a\u7d22\u5f15\u503c\u52a01\u3002\u5982\u679c\u4f60\u5728\u4e00\u4e2a\u6570\u7ec4\u4e2d\u67095\u4e2a\u9879\uff0c\u7136\u540e\u4f60\u6dfb\u52a0\u4e86\u7b2c\u516d\u4e2a\uff0c\u5b83\u7684\u7d22\u5f15\u503c\u5219\u4e3a5\uff0c\u800c\u4e0d\u7ba1\u4f60\u901a\u8fc7.addSection();\u65b9\u6cd5\u628a\u5b83\u6dfb\u52a0\u5728\u4e86\u4ec0\u4e48\u5730\u65b9\u3002<\/p>\n<h4>.display();<\/h4>\n<p>\u8fd9\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u8ba9\u4f60\u5c55\u5f00\u4e00\u4e2a\u6307\u5b9a\u7684\u5143\u7d20\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u5b83\u7684\u7d22\u5f15\u503c\u6765\u9009\u62e9\u8fd9\u4e2a\u5143\u7d20\uff08\u5982\u679c\u4f60\u6dfb\u52a0\u4e86\u4e00\u4e2a\u65b0\u7684\u5143\u7d20\u5bf9\uff0c\u4f60\u53c8\u60f3\u5c55\u5f00\u5b83\u4eec\uff0c\u4f60\u9700\u8981\u4f7f\u7528\u4e00\u4e2a\u65b0\u7684\u7d22\u5f15\u503c\uff09\u3002<\/p>\n<p><pre lang=\"javascript\">\nAccordionObject.display(5); \/\/ \u8fd9\u5c06\u663e\u793a\u4f60\u65b0\u589e\u52a0\u7684\u5143\u7d20\n<\/pre>\n<\/p>\n<h3>\u5b9e\u4f8b\u6f14\u793a<\/h3>\n<p>\u8fd9\u91cc\u6211\u4eec\u6709\u4e00\u4e2a\u5168\u529f\u80fd\u7684\u624b\u98ce\u7434\uff0c\u4f7f\u7528\u4e86\u4e0a\u9762\u6211\u4eec\u770b\u5230\u7684\u6240\u6709\u4e8b\u4ef6\u548c\u65b9\u6cd5\uff0c\u8fd8\u6709\u975e\u5e38\u591a\u7684\u9009\u9879\u3002\u4ed4\u7ec6\u9605\u8bfb\u4e0b\u9762\u7684\u4ee3\u7801\u548c\u4ee3\u7801\u5185\u76f8\u5173\u7684\u6ce8\u91ca\uff0c\u770b\u770b\u5b83\u4eec\u662f\u600e\u4e48\u4f7f\u7528\u7684\u3002<\/p>\n<p><pre lang=\"javascript\">\n\/\/ \u628a\u5f00\u5173\u5143\u7d20\u548c\u5185\u5bb9\u5143\u7d20\u8d4b\u503c\u7ed9\u4e24\u4e2a\u53d8\u91cf\nvar toggles = $$('.togglers');\nvar content = $$('.elements');\n \n\/\/ \u5efa\u7acb\u4e00\u4e2a\u5bf9\u8c61\u53d8\u91cf\n\/\/ \u4f7f\u7528new\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u624b\u98ce\u7434\u5bf9\u8c61\n\/\/ \u8bbe\u7f6e\u5f00\u5173\u6570\u7ec4\n\/\/ \u8bbe\u7f6e\u5185\u5bb9\u6570\u7ec4\n\/\/ \u8bbe\u7f6e\u76f8\u5173\u9009\u9879\u548c\u4e8b\u4ef6\nvar AccordionObject = new Accordion(toggles, content, {\n    \/\/ \u5f53\u9875\u9762\u8f7d\u5165\u540e\n    \/\/ \u8fd9\u5c06\u663e\u793a\uff08show\uff09\u5185\u5bb9\u5143\u7d20\uff08\u5bf9\u5e94\u7d22\u5f15\u7684\u5143\u7d20\uff09\n    \/\/ \u6ca1\u6709\u4efb\u4f55\u6e10\u53d8\u52a8\u753b\uff0c\u53ea\u662f\u5c55\u5f00\n    \/\/ \u540c\u65f6\u6ce8\u610f\uff1a\u5982\u679c\u4f60\u4f7f\u7528\u4e86\u201cfixedHeight\u201d\uff0c\n    \/\/ \u5f53\u9875\u9762\u7b2c\u4e00\u6b21\u8f7d\u5165\u65f6\uff0cshow\u9009\u9879\u5c06\u4e0d\u4f1a\u8d77\u4f5c\u7528\n    \/\/ &quot;show&quot;\u9009\u9879\u4f1a\u8986\u76d6&quot;display&quot;\u9009\u9879\n    show: 0, \n \n \n    \/\/ \u5f53\u9875\u9762\u8f7d\u5165\u540e\n    \/\/ \u8fd9\u5c06\u663e\u793a\uff08display\uff09\u5185\u5bb9\u5143\u7d20\uff08\u5bf9\u5e94\u7d22\u5f15\u7684\u5143\u7d20\uff09\n    \/\/ \u5185\u5bb9\u5c55\u5f00\u65f6\u5c06\u6709\u6e10\u53d8\u52a8\u753b\n    \/\/ \u5982\u679c\u540c\u65f6\u8bbe\u7f6e\u4e86display\u9009\u9879\u548cshow\u9009\u9879\n    \/\/ show\u9009\u9879\u5c06\u8986\u76d6display\u9009\u9879\n    \/\/ display: 0,\n \n    \/\/ \u9ed8\u8ba4\u4e3atrue\n    \/\/ \u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u5782\u76f4\u7684\u624b\u98ce\u7434\n    height : true,\n \n    \/\/ \u8fd9\u662f\u6c34\u5e73\u624b\u98ce\u7434\u53c2\u6570\u4f7f\u7528\u7684\n    \/\/ \u7531\u4e8e\u7275\u6d89\u5230CSS\uff0c\u8fd9\u4e2a\u4f1a\u6bd4\u8f83\u590d\u6742\n    \/\/ \u6211\u4eec\u5728\u540e\u9762\u7684\u67d0\u4e00\u8bb2\u4e2d\u518d\u8bb2\u4e00\u4e0b\uff1f\n    width : false,\n \n    \/\/ \u9ed8\u8ba4\u4e3atrue\n    \/\/ \u8fd9\u5c06\u4f1a\u7ed9\u5185\u5bb9\u4e00\u4e2a\u4e0d\u900f\u660e\u5ea6\u7684\u6e10\u53d8\u6548\u679c\n    opacity: true,\n \n    \/\/ \u9ed8\u8ba4\u4e3afalse\uff0c\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2a\u6574\u6570 - \n    \/\/ \u5c06\u56fa\u5b9a\u6240\u6709\u5185\u5bb9\u533a\u5757\u7684\u9ad8\u5ea6\n    \/\/ \u9700\u8981\u8bbe\u7f6ecss\u4e2d\u7684overflow\u89c4\u5219\n    \/\/ \u5982\u679c\u4f7f\u7528\u4e86&quot;show&quot;\uff0c\u5728\u9875\u9762\u7b2c\u4e00\u6b21\u8f7d\u5165\u65f6\u4e0d\u4f1a\u751f\u6548\n    fixedHeight: false, \n \n    \/\/ \u53ef\u4ee5\u4e3afalse\u6216\u8005\u4e00\u4e2a\u6574\u6570\n    \/\/ \u548c\u4e0a\u9762\u7684fixedHeight\u7c7b\u4f3c\uff0c\n    \/\/ \u4e0d\u8fc7\u8fd9\u662f\u9488\u5bf9\u6c34\u5e73\u624b\u98ce\u7434\u7684\u8bbe\u7f6e\n    fixedWidth: false,\n \n    \/\/ \u53ef\u4ee5\u8ba9\u4f60\u5f00\u5173\u4e00\u4e2a\u5c55\u5f00\u7684\u9879\n    alwaysHide: true,\n \n    \/\/ \u6807\u51c6\u7684onComplete\u4e8b\u4ef6\n    \/\/ \u4e3a\u6bcf\u4e00\u4e2a\u5185\u5bb9\u5757\u5143\u7d20\u4f20\u9012\u4e00\u4e2a\u53d8\u91cf        \n    onComplete: function(one, two, three, four, five){\n        one.highlight('#5D80C8'); \/\/ \u84dd\u8272\n        two.highlight('#5D80C8');\n        three.highlight('#5D80C8');\n        four.highlight('#5D80C8'); \n        five.highlight('#5D80C8'); \/\/ \u8fd9\u662f\u6dfb\u52a0\u7684\u8282\n        $('complete').highlight('#5D80C8');\n    },\n \n    \/\/ \u8fd9\u4e2a\u4e8b\u4ef6\u5c06\u5728\u4f60\u5f00\u5173\u4e00\u4e2a\u5143\u7d20\u65f6\u89e6\u53d1\n    \/\/ \u5c06\u4f1a\u4f20\u9012\u6b63\u5728\u6253\u5f00\u7684\u5f00\u5173\u5143\u7d20\n    \/\/ \u548c\u5185\u5bb9\u5143\u7d20\n    onActive: function(toggler, element) {\n        toggler.highlight('#76C83D'); \/\/ \u7eff\u8272\n        element.highlight('#76C83D');\n        $('active').highlight('#76C83D');\n    },\n \n    \/\/ \u8fd9\u4e2a\u4e8b\u4ef6\u5c06\u5728\u4e00\u4e2a\u5143\u7d20\u5f00\u59cb\u9690\u85cf\u65f6\u89e6\u53d1\n    \/\/ \u5c06\u4f1a\u4f20\u9012\u6240\u6709\u6b63\u5728\u5173\u95ed\u7684\u5143\u7d20\n    \/\/ \u6216\u8005\u6ca1\u6709\u5c55\u5f00\u7684\u5143\u7d20\n    onBackground: function(toggler, element) {\n        toggler.highlight('#DC4F4D'); \/\/ \u7ea2\u8272\n        element.highlight('#DC4F4D');    \n        $('background').highlight('#DC4F4D');    \n    }\n});\n \n$('add_section').addEvent('click', function(){\n    \/\/ \u65b0\u589e\u52a0\u7684\u8282\u662f\u6210\u5bf9\u7684 \n    \/\/ \uff08\u5305\u62ec\u5f00\u5173\u7684id\u548c\u76f8\u5173\u7684\u5185\u5bb9\u7684id\uff09\n    \/\/ \u540e\u9762\u662f\u5b83\u4eec\u8981\u653e\u7f6e\u7684\u4f4d\u7f6e\u7684\u7d22\u5f15\n    AccordionObject.addSection('togglersID', 'elementsID', 0);    \n});\n \n$('display_section').addEvent('click', function(){\n    \/\/ \u5c06\u51b3\u5b9a\u54ea\u4e2a\u5143\u7d20\u5728\u9875\u9762\u7b2c\u4e00\u6b21\u8f7d\u5165\u65f6\u663e\u793a\n    \/\/ \u5c06\u8986\u76d6display\u9009\u9879\u7684\u8bbe\u7f6e\n    AccordionObject.display(4);  \n});\n<\/pre>\n<\/p>\n<p>\n<script type=\"text\/javascript\">\nwindow.addEvent('domready', function() {\nvar toggles = $$('.togglers');\nvar content = $$('.elements');\nvar AccordionObjectB = new Accordion(toggles, content, {\nshow: 0, \nheight : true,\nwidth : false,\nopacity: true,\nfixedHeight: false, \nfixedWidth: false,\nalwaysHide: true,\nonComplete: function(one, two, three, four, five){\none.highlight('#5D80C8'); \/\/blue\ntwo.highlight('#5D80C8');\nthree.highlight('#5D80C8');\nfour.highlight('#5D80C8'); \nfive.highlight('#5D80C8'); \/\/the added section\n$('complete').highlight('#5D80C8');\n},\nonActive: function(toggler, element) {\ntoggler.highlight('#76C83D'); \/\/green\nelement.highlight('#76C83D');\n$('active').highlight('#76C83D');\n},\nonBackground: function(toggler, element) {\ntoggler.highlight('#DC4F4D'); \/\/red\nelement.highlight('#DC4F4D');\n$('background').highlight('#DC4F4D');\n}\n});<\/p>\n<p>$('add_section').addEvent('click', function(){\nAccordionObjectB.addSection('togglersID', 'elementsID', 0);    \n});<\/p>\n<p>$('display_section').addEvent('click', function(){\nAccordionObjectB.display(4);  \n});\n});\n<\/script><\/p>\n<style type=\"text\/css\">\n.sortlists {width: 250px;list-style-type: none;min-height: 30px;} \n.sortlists li {padding: 5px;background-color: #333;color: white;font-size: 23px;border-bottom: 1px solid white;} \n.sortlists li span{height: 25px;width: 20px;background-color: #666;display: block;float: left;margin-right: 10px;} \n.sortlists li span span{height: 25px;width: 20px;} \n.ind {width: 200px;padding: 10px;background-color: #33CCCC;border-bottom: 1px solid white;} \n.order {padding: 10px;width: auto;} \n.ind {width: 200px;background-color: #666;color: white;padding: 10px;} \n#accordian_wrap {width: 250px;} \n.togglers {font-weight: bold;font-size: 1.2em;} \n#togglersID {font-weight: bold;font-size: 1.2em;}\n<\/style>\n<p>\u8fd9\u91cc\u4f60\u53ef\u4ee5\u770b\u5230\u4e8b\u4ef6\u662f\u4ec0\u4e48\u65f6\u5019\u89e6\u53d1\u7684\u3002<\/p>\n<div id=\"complete\" class=\"ind\">onComplete<\/div>\n<div id=\"active\" class=\"ind\">onActive<\/div>\n<div id=\"background\" class=\"ind\">onBackground<\/div>\n<p>\u53ef\u4ee5\u8bd5\u8bd5\u7528\u4e0b\u9762\u7684\u6309\u94ae\u6dfb\u52a0\u4e00\u5bf9\u5185\u5bb9\u3002<\/p>\n<div id=\"accordion_wrap\">\n<p class=\"togglers\">Toggle 1<\/p>\n<p class=\"elements\">Here is the content of toggle 1 Here is the content of toggle 1 Here is the content of toggle 1 Here is the content of toggle 1 Here is the content of toggle 1 Here is the content of toggle 1 Here is the content of toggle 1 Here is the content of toggle 1<\/p>\n<p class=\"togglers\">Toggle 2<\/p>\n<p class=\"elements\">Here is the content of toggle 2<\/p>\n<p class=\"togglers\">Toggle 3<\/p>\n<p class=\"elements\">Here is the content of toggle 3<\/p>\n<p class=\"togglers\">Toggle 4<\/p>\n<p class=\"elements\">Here is the content of toggle 4<\/p>\n<p id=\"togglersID\">Toggle Add<\/p>\n<p id=\"elementsID\">Here is the content of toggle 4<\/p>\n<\/p>\n<\/div>\n<p>    <input type=\"button\" id=\"add_section\" value=\"add section\" \/><br \/> <br \/>\n    <input type=\"button\" id=\"display_section\" value=\"display section\" \/><\/p>\n<\/p>\n<h4>\u8981\u6ce8\u610f\u7684\u5730\u65b9<\/h4>\n<ul style=\"list-style-type:disc\">\n<li>.display\u53ef\u4ee5\u8bc6\u522b\u7d22\u5f15\uff08index\uff09\uff0c\u4e0d\u8fc7\u5982\u4f60\u4f7f\u7528\u4e86addSection\u65b9\u6cd5\uff0c\u90a3\u4e48\u8fd9\u4e00\u8282\u5c06\u4f7f\u7528\u6700\u540e\u4e00\u4e2a\u7d22\u5f15<\/li>\n<li>\u5982\u679c\u4f60\u4f7f\u7528\u4e86\u201cfixedHeight\u201d\u9009\u9879\uff0c\u5728\u201cshow\u201d\u9009\u9879\u4e0b\u4e0d\u4f1a\u8d77\u4efb\u4f55\u4f5c\u7528\uff0c\u4f46\u662f\u5728\u201cdisplay\u201d\u9009\u9879\u4e0b\u4f1a\u6709\u4f5c\u7528<\/li>\n<\/ul>\n<h4>\u66f4\u591a\u624b\u98ce\u7434\u9009\u9879\u3001\u4e8b\u4ef6\u548c\u65b9\u6cd5<\/h4>\n<p>\u624b\u98ce\u7434\uff08Accordion\uff09\u7c7b\u7ee7\u627f\u81eaFx.Element\u7c7b\uff0c\u800cFx.Element\u7c7b\u53c8\u7ee7\u627f\u81eaFx\u7c7b\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b\u7c7b\u7684\u5404\u79cd\u9009\u9879\u6765\u4f18\u5316\u4f60\u7684\u624b\u98ce\u7434\uff08Accordion\uff09\u3002\u867d\u7136\u5b83\u770b\u8d77\u6765\u662f\u4e2a\u5f88\u7b80\u5355\u7684\u4e1c\u897f\uff0c\u4f46\u662f\u624b\u98ce\u7434\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u548c\u5f3a\u5927\u7684\u63d2\u4ef6\u3002\u6211\u975e\u5e38\u4e50\u610f\u770b\u5230\u6709\u4eba\u5229\u7528\u8fd9\u4e2a\u505a\u51fa\u7684\u4efb\u4f55\u6548\u679c\u3002<\/p>\n<h3>\u66f4\u591a\u5b66\u4e60<\/h3>\n<p>\u53c2\u8003\u6587\u6863\u4e2d\u7684<a href=\"http:\/\/docs.mootools.net\/Plugins\/Accordion\" target=\"_blank\" title=\"accordion\u8fd9\u4e00\u8282\">accordion\u8fd9\u4e00\u8282<\/a>\uff0c\u8fd8\u6709<a href=\"http:\/\/docs.mootools.net\/Plugins\/Fx.Elements\" target=\"_blank\" title=\"Fx.Elements\">Fx.Elements<\/a>\u548c<a href=\"http:\/\/docs.mootools.net\/Fx\/Fx\" target=\"_blank\" title=\"Fx\">Fx<\/a>\u8fd9\u4e24\u8282\u3002\u4f60\u8fd8\u53ef\u4ee5\u770b\u770b<a href=\"http:\/\/demos.mootools.net\/Accordion\" target=\"_blank\" title=\"MooTools\u5b98\u65b9demo\u4e2d\u7684accordion\u7684\u4f7f\u7528\">MooTools\u5b98\u65b9demo\u4e2d\u7684accordion\u7684\u4f7f\u7528<\/a>\u3002<\/p>\n<p><b><a href=\"http:\/\/www.consideropen.com\/downloads\/30days_of_moo\/mootorial_day17_accordion.zip\" target=\"_blank\" title=\"\u4e0b\u8f7d\u4e00\u4e2a\u5305\u542b\u4f60\u5f00\u59cb\u6240\u9700\u8981\u7684\u6240\u6709\u4e1c\u897f\u7684zip\u5305\">\u4e0b\u8f7d\u4e00\u4e2a\u5305\u542b\u4f60\u5f00\u59cb\u6240\u9700\u8981\u7684\u6240\u6709\u4e1c\u897f\u7684zip\u5305<\/a><\/b><\/p>\n<p>\u5305\u62ecMooTools 1.2\u7684\u6838\u5fc3\u5e93\u548c\u6269\u5c55\uff08\u66f4\u591a\uff09\u5e93\uff0c\u4e0a\u9762\u7684\u793a\u4f8b\uff0c\u4e00\u4e2a\u5916\u90e8\u7684JavaScript\u6587\u4ef6\uff0c\u4e00\u4e2a\u7b80\u5355\u7684HTML\u9875\u9762\u548c\u4e00\u4e2aCSS\u6587\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mootools 1.2\u624b\u98ce\u7434\uff08Accordion\uff09\u6559\u7a0b \u539f\u6587\u5730\u5740\uff1a30 Days of Mootools 1.2 Tutorials &#8211; Day 17 &#8211; Accordion \u8bf7\u5c0a\u91cd\u4e2a\u4eba\u52b3\u52a8\uff0c\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\uff1ahttp:\/\/fdream.net\uff0c\u8bd1\u8005\uff1aFdream \u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u51c6\u5907\u597d\u5f00\u59cb\u8fd9\u4e00\u8bb2\uff0c\u8bf7\u53c2\u8003\u8fd9\u4e00\u7cfb\u5217\u7684\u6559\u7a0b\uff0c\u8fd9\u91cc\u662f\u300aMooTools 1.2\u7cfb\u5217\u6559\u7a0b\u76ee\u5f55\u300b\u3002 \u7ee7\u7eed\u6211\u4eec\u7684\u201c\u66f4\u591a\u201d\uff08More\uff09\u5e93\u91cc\u9762\u7684\u63d2\u4ef6\u6559\u7a0b\uff0c\u4eca\u5929\u6211\u4eec\u6765\u5b66\u4e60\u4e00\u4e0b\u53ef\u80fd\u662f\u6700\u6d41\u884c\u6700\u53d7\u6b22\u8fce\u7684\u63d2\u4ef6\u2014\u2014\u624b\u98ce\u7434\u3002\u521b\u5efa\u548c\u914d\u7f6e\u4e00\u4e2a\u57fa\u672c\u7684\u624b\u98ce\u7434\u5f88\u7b80\u5355\uff0c\u4f46\u662f\u4f60\u4e00\u5b9a\u8981\u8ba4\u771f\u770b\u5b8c\u5168\u6587\uff0c\u56e0\u4e3a\u66f4\u591a\u7684\u9ad8\u7ea7\u9009\u9879\u53ef\u80fd\u6709\u4e00\u4e9b\u590d\u6742\u3002 \u57fa\u7840\u77e5\u8bc6 \u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u624b\u98ce\u7434 \u8981\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u624b\u98ce\u7434\uff0c\u4f60\u9700\u8981\u9009\u62e9\u4e00\u4e9b\u6210\u5bf9\u7684\u5143\u7d20\u2014\u2014\u5305\u542b\u6807\u9898\u548c\u5185\u5bb9\u3002\u56e0\u6b64\uff0c\u9996\u5148\uff0c\u9700\u8981\u7ed9\u6bcf\u4e00\u4e2a\u6807\u9898\u548c\u6bcf\u4e00\u4e2a\u5185\u5bb9\u5757\u5206\u522b\u6307\u5b9a\u4e00\u4e2acss\u7c7b\u540d\uff1a &lt;h3 class=&quot;togglers&quot;&gt;Toggle 1&lt;\/h3&gt; &lt;p class=&quot;elements&quot;&gt;Here is the content of toggle 1&lt;\/p&gt; &lt;h3 class=&quot;togglers&quot;&gt;Toggle 2&lt;\/h3&gt; &lt;p class=&quot;elements&quot;&gt;Here is the content of toggle 2&lt;\/p&gt; \u73b0\u5728\uff0c\u6211\u4eec\u9009\u62e9\u6240\u6709css\u7c7b\u540d\u4e3a\u201ctogglers\u201d\u548c\u6240\u6709css\u7c7b\u540d\u4e3a\u201celements\u201d\u7684\u5143\u7d20\uff0c\u5e76\u628a\u5b83\u4eec\u8d4b\u503c\u7ed9\u53d8\u91cf\uff0c\u7136\u540e\u521d\u59cb\u5316\u4e00\u4e2a\u624b\u98ce\u7434\u5bf9\u8c61\u3002 var toggles = $$(&#8216;.togglers&#8217;); var content = $$(&#8216;.elements&#8217;); \/\/ \u521b\u5efa\u4f60\u7684\u5bf9\u8c61\u53d8\u91cf \/\/ \u4f7f\u7528\u201cnew\u201d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u624b\u98ce\u7434\u5bf9\u8c61 &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[120,104,328,123],"class_list":["post-630","post","type-post","status-publish","format-standard","hentry","category-coding","tag-AJAX","tag-JavaScript","tag-mootools","tag-123"],"views":10699,"_links":{"self":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/posts\/630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/comments?post=630"}],"version-history":[{"count":0,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/posts\/630\/revisions"}],"wp:attachment":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/media?parent=630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/categories?post=630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/tags?post=630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}