05 01 accordion UI containers 03 Accordion accordion UI accordion 54

Similar documents
5-1 nav css 5-2

互動網頁技術系列課程 HTML與CSS網站基礎設計 [12pt]

Chapter V.S. PC

Microsoft Word - 最新正文.doc

關於本書 l 3 PhoneGap Appcelerator Titanium Sencha Touch (wrapper framework) Native App PhoneGap Build Native App Hybrid App Java Objective-C Android SDK

關於本書 Part 3 CSS XHTML Ajax Part 4 HTML 5 API JavaScript HTML 5 API Canvas API ( ) Video/Audio API ( ) Drag and Drop API ( ) Geolocation API ( ) Part 5

06 01 action JavaScript action jquery jquery AJAX CSS jquery CSS jquery HTML CSS jquery.css() getter setter.css('backgroundcolor') jquery CSS b

bootstrap - 2

Microsoft Word - Ch06.docx

week06.key

《linux从入门到精通》实验指导第三讲:文件及目录操作

Microsoft Word PHPCh15.docx

《linux从入门到精通》实验指导第三讲:文件及目录操作

《linux从入门到精通》实验指导第三讲:文件及目录操作

1 1 大概思路 创建 WebAPI 创建 CrossMainController 并编写 Nuget 安装 microsoft.aspnet.webapi.cors 跨域设置路由 编写 Jquery EasyUI 界面 运行效果 2 创建 WebAPI 创建 WebAPI, 新建 -> 项目 ->

XHTML width/height bdo a code href object charset codebase hreflang archive lang type alt dir name name xml:lang rel/rev align shape/coords hspace/vsp

F477

1. 2. Flex Adobe 3.

Microsoft Word - PHP7Ch01.docx

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2.

WordPress OSSF OSSF is Seeking Software Freedom 1 blog WordPress WordPress WordPress WordPress 2 WordPress WordPress is a state-of-the-art semantic pe

Microsoft Word - 第01章new.doc

CH15.indd

untitled

chapter 2 HTML5 目錄iii HTML HTML HTML HTML HTML canvas

Microsoft Word - 01.DOC

使用 CSS+Div 布局网页 实训目的 常见网页布局方式有表格布局 框架布局和使用 CSS+DIV 布局等方式 使用 CSS+DIV 布局网页, 真正实现内容与形式的分离, 具有页面代码整洁清晰, 多线程加载等特点, 网页浏览速度更快, 因此成为目前网页布局的主流技术 熟练掌握 CSS+DIV 布

Microsoft Word - 改版式网页全文.doc

HTML5 & CSS3 色彩 背景與漸層屬性 12-1 (color property) CSS 3 color HTML opacity HTML CSS Color Module Level 3 W3C CSS

導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式

數位圖書館/博物館相關標準 2


Microsoft PowerPoint - ch6 [相容模式]

PowerPoint 演示文稿

A-1 HTML A-1-1 HTML 1 HTML JSP HTML HTML HTML JSP A HTML HTML HTML HTML HTML HTML HTML HTML.htm.html HTML Windows NotePad HTML IE [ / ] NotePad A-2

大漠 伪前端, 就职于淘宝

Chapter 位元素04 定放棄在網頁版面中使用表格, 是 Web 標準的關鍵之一 其實表格使用的目的不在此, 它應該是用來顯示格狀資料, 就如同 Excel 的工作表一樣 不過, 在 CSS 發展以前, 我們習慣用表格來建立一個有格狀的網頁, 讓元素有組織的排列在上, 而且使用一些像間隔圖片 (

Microsoft PowerPoint - Ch00-4-XHTML.ppt [相容模式]

(CIP) Web /,. :, ISBN X.W T P393.4 CIP (2004) Web ( ) ( / ) : * 787

untitled

final

老码农原创小说《码农故事》

! 2000 CSSsprites.com Web FTP app 20% 80% getelementbyid() UI Facebook F8 Web CSSsprites.com Web JavaScript CSS React xi React UI UI 反應 UI 宣告 d

RUN_PC連載_8_.doc

可 Web 编程的NativeUI 设计与实现

F477

國立臺灣科技大學

The Applicibility of Google Maps/Earth and Urmap API to Real Estate Database* Jin-Tsong Hwang** Abstract Whether the real estate market is prosperous

本 课 程 作 为 非 计 算 机 专 业 本 科 通 识 课 程, 是 一 门 理 论 和 实 践 紧 密 结 合 的 实 用 课 程, 内 容 包 括 计 算 机 基 础 部 分 和 程 序 设 计 部 分 计 算 机 基 础 部 分 涵 盖 计 算 机 软 硬 件 组 成 数 制 表 示 操

untitled

付宝容器 jsapi 档 册 PDF 版本 本版本为实验版本, 为线下独 查看使, 受制于 成 PDF 程序的限制, 样式问题还没有很好的解决, 例如分 切图 代码 亮 推荐使 在线版本, 便实时查看 jsapi 运 效果 如需搜索, 使 阅读 PDF 软件 带功能即可 更多细节样式调整和 录索引探

7. 小 星 星 一 閃 一 閃 亮 晶 晶, 滿 天 都 是 小 星 星 ; 掛 在 天 空 放 光 明, 好 像 許 多 小 眼 睛 ; 一 閃 一 閃 亮 晶 晶, 滿 天 都 是 小 星 星

Chapter 9: Objects and Classes

Microsoft Word - template.doc

jquery 包 装 集 可 以 说 是 Dom 对 象 扩 充. 在 jquery 世 界 中 将 所 有 对 象, 无 论 是 一 个 还 是 一 组, 都 封 装 成 一 个 jquery 包 装 集, 比 如 获 取 包 含 一 个 元 jquery 包 装 集 : 1. var jquer

《linux从入门到精通》实验指导第三讲:文件及目录操作

中国软件2013校园招聘通知

Advanced PHP Programming

PowerPoint プレゼンテーション

投影片 1

天仁期末個人報告1.PDF

3-2 jQuery v11

2 SGML, XML Document Traditional WYSIWYG Document Content Presentation Content Presentation Structure Structure? XML/SGML 3 2 SGML SGML Standard Gener

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

XML/DTD (1) XML (Markup) SGML HTML XML XML XML 2004/7/ All Rights Reserved 2

13 根 据 各 种 网 络 商 务 信 息 对 不 同 用 户 所 产 生 的 使 用 效 用, 网 络 商 务 信 息 大 致 可 分 为 四 级, 其 中 占 比 重 最 大 的 是 ( A ) A 第 一 级 免 费 信 息 B 第 二 级 低 收 费 信 息 C 第 三 级 标 准 收 费

無障礙網頁開發規範二版(草案)

week04.key

投影片 1

第二章 补充案例

Microsoft Word - ch02.doc

第三章 补充案例

南華大學數位論文

INTRODUCTION TO COM.DOC

了 波 涛 和 号 声 袁 读 者 很 容 易 就 进 入 广 州 城 的 水 上 旅 途 袁 进 入 一 座 野 水 上 名 城 冶 的 传 说 中 去 遥 于 是 袁 一 座 名 城 往 事 充 满 了 漂 流 感 袁 旋 律 自 水 上 而 来 袁 我 们 就 这 样 来 到 了 往 事 的

壹、摘 要

HTML CSSHTML CSS 4

第 1 列 的 按 鈕 從 Albatross ~ Duck 1, 第 2 列 按 鈕 從 Eagle ~ Hawk 2, 第 3 行 按 鈕 從 Ibis ~ Lark 3, 而 只 有 第 3 列 按 鈕 多 設 定 span 元 素 ( 理 由 後 面 會 詳 細 說 明 ) html 具 h

Preface This guide is intended to standardize the use of the WeChat brand and ensure the brand's integrity and consistency. The guide applies to all d

2.4 Selenium Python Selenium Selenium Selenium Selenium pip install selenium Chrome WebDriver Google Chrome (Linux, Mac, Windows) Chrome WebDriv

Microsoft Word - diy_chi.doc

《linux从入门到精通》实验指导第三讲:文件及目录操作

檢 視 原 始 碼 JavaScript 9 0 $(function(){ // 幫 div.qa_title 加 上 hover 及 click 事 件 // 同 時 把 兄 弟 元 素 div.qa_content 隱 藏 起 來 $('#qacontent ul.accordionpart

合金投资年报正文.PDF


从 宾 馆 到 又 一 城 是 十 五 分 钟, 从 又 一 城 到 邵 逸 夫 是 十 分 钟, 去 时 一 路 上 坡 很 辛 苦, 回 时 一 路 下 坡 很 轻 松, 很 像 上 小 学 时 的 心 情, 这 是 最 初 几 天 最 深 的 感 受 有 段 时 间 很 少 走 校 内 的 路

59 1 CSpace 2 CSpace CSpace URL CSpace 1 CSpace URL 2 Lucene 3 ID 4 ID Web 1. 2 CSpace LireSolr 3 LireSolr 3 Web LireSolr ID

1.5招募说明书(草案)

标题

untitled

WWW PHP

团 学 要 闻 我 校 召 开 共 青 团 五 届 九 次 全 委 ( 扩 大 ) 会 议 3 月 17 日, 我 校 共 青 团 五 届 九 次 全 委 ( 扩 大 ) 会 议 在 行 政 办 公 楼 五 楼 会 议 室 举 行, 校 团 委 委 员 各 院 ( 系 ) 团 委 书 记 校 学 生

Ác Åé å Serial ATA ( Sil3132) S A T A (1) SATA (2) BIOS SATA (3)* RAID BIOS RAID (4) SATA (5) SATA (a) S A T A ( S A T A R A I D ) (b) (c) Windows XP

XP11067_內文.pdf

胃癌早诊早治技术方案.doc


第一章

Microsoft Word - 苹果脚本跟我学.doc

U3

HTML5 + PhoneGap + Android

Transcription:

jquery UI plugin Accordion

05 01 accordion UI containers 03 Accordion accordion UI accordion 54

05 jquery UI plugin 3-1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/tr/ html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>jquery UI Accordion Widget Example 1</title> </head> <body> <ul id="myaccordion"> <li><a href="#">header 1</a> <div>wow, look at all this content that can be shown or hidden with a simple click! </li> <li><a href="#">header 2</a><div>Lorem ipsum dolor sit amet, </li> <li><a href="#">header 3</a><div>Donec at dolor ac.. </li> </ul> 01 03-1 3-1 55

05 01 03 <script type="text/javascript" src="jqueryui/jquery-1.2.6.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.accordion.js"></script> <script type="text/javascript"> //function to execute when doc ready $(function() { //turn specified element into an accordion $("#myaccordion").accordion(); </script> </body> </html> accordion1.html jqueryui Accordion 3-2 HTML list JavaScript jquery jquery-1.2.6.js UI ui.core.js ui.accordion.js 56

05 jquery UI plugin jquery UI script <script> <ul> jquery $ $(document).ready(function(){) ID $("#myaccordion") accordion() <div> <a> # href href 01 03-2 UI 3-2 100% widget stylesheet jquery UI flora Theme Roller flora accordion1.html <head> <link> 57

05 01 <link rel="stylesheet" type="text/css" href="jqueryui/themes/flora/flora. accordion.css"> accordion2.html jqueryui 03 3-3 Accordion CSS <li> Firefox Firebug DOM un-minified Firebug 58

05 jquery UI plugin 01 03-2 accordion2.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/tr/ html4/strict.dtd"> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="styles/accordiontheme.css"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>jquery UI Accordion Widget Example 3</title> </head> <body> <ul id="myaccordion"> <span class="corner topleft"></span><span class="corner topright"></span> <span class="corner bottomleft"></span><span class="corner bottomright"> </span> <li><a href="#">header 1</a><div>Wow, look at all this content that can be shown or hidden with a simple click!</li> <li><a href="#">header 2</a><div>Lorem ipsum dolor sit amet,.</li> <li><a href="#">header 3</a><div>Donec at dolor ac metus..</li> 3-4 Firebug 59

05 01 03 </ul> <script type="text/javascript" src="jqueryui/jquery-1.2.6.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.accordion.js"></script> <script type="text/javascript"> //function to execute when doc ready $(function() { //turn specified element into an accordion $("#myaccordion").accordion(); </script> </body> </html> Accordion accordion3.html jqueryui uiaccordion CSS ui-accordion-header #myaccordion { width:200px; border:2px solid #000000; position:relative; list-style-type:none; padding-left:0;.ui-accordion-header { text-decoration:none; font-weight:bold; color:#000000; display:block; width:100%; text-align:center;.ui-accordion div div { 60

05 jquery UI plugin font-size:90%;.ui-accordion a { color:#ffffff; background:url(../img/accordion/header-sprite.gif) repeat-x 0px 0px;.ui-accordion a.selected { background:url(../img/accordion/header-sprite.gif) repeat-x 0px -22px;.ui-accordion a:hover { background:url(../img/accordion/header-sprite.gif) repeat-x 0px -44px; /* container rounded corners */.corner { position:absolute; width:12px; height:13px; background:url(../img/accordion/corner-sprite.gif) no-repeat;.topleft { top:-2px; left:-2px; background-position:0px 0px;.topRight { top:-2px; right:-2px; background-position:0px -13px;.bottomRight { bottom:-2px; right:-2px; background-position:0px -26px;.bottomLeft { bottom:-2px; left:-2px; background-position:0px -39px; 01 03-2 61

05 01 accordiontheme.css styles accordion3.html img accordion 03 Accordion 3-3 3-5 Property active first child alwaysopen true animated "slide" autoheight true clearstyle false jquery UI 1.7.1 62

05 jquery UI plugin event "click" fillspace false header "a" navigation false navigationfilter location.href href location.href selectedclass "selected" Tip jquery UI jquery UI API http://docs.jquery.com/ui/ self- explanatory accordion3.html 01 03-3 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/tr/ html4/strict.dtd"> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="styles/accordiontheme.css"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>jquery UI Accordion Widget Example 4</title> </head> <body> <div id="myaccordion"> <span class="corner topleft"></span><span class="corner topright"></span> jquery UI 1.7.1 63

05 01 03 <span class="corner bottomleft"></span><span class="corner bottomright"> </span> <div><a href="#">header 1</a><div>Wow, look at all this.. <div><a href="#">header 2</a><div>Lorem ipsum dolor sit. <div><a href="#">header 3</a><div>Donec at dolor ac. <script type="text/javascript" src="jqueryui/jquery-1.2.6.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.accordion.js"></script> <script type="text/javascript"> //function to execute when doc ready $(function() { //set the event property var accopts = { event:"mouseover" Accordion //turn specified element into an accordion $("#myaccordion").accordion(accopts); </script> </body> </html> accopts accordion() event accordion4.html accordion4inline.htm 64

05 jquery UI plugin //function to execute when doc ready $(function() { //turn specified element into an accordion $("#myaccordion").accordion({ event:"mouseover" </script> accordio4n.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/tr/ html4/strict.dtd"> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="styles/accordiontheme.css"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>jquery UI Accordion Widget Example 5</title> </head> <body> <div id="myaccordion"> <span class="corner topleft"></span><span class="corner topright"></span> <span class="corner bottomleft"></span><span class="corner bottomright"> </span> <div><a id="header1" href="#">header 1</a><div>Wow, look at all this. <div><a id="header2" href="#">header 2</a><div>Lorem ipsum dolor <div><a id="header3" href="#">header 3</a><div>Donec at dolor ac <script type="text/javascript" src="jqueryui/jquery-1.2.6.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.accordion.js"></script> 01 03-3 type="text/javascript"> <script 65

05 01 03 <script type="text/javascript"> //function to execute when doc ready $(function() { //configure accordion var accopts = { event:"mouseover", active:"#header3" ; //turn specified element into an accordion $("#myaccordion").accordion(accopts); </script> </body> </html> Accordion active HTML id accordion5.html //configure accordion var accopts = { event:"mouseover", active:"#header3", alwaysopen:false, autoheight:false 66

05 jquery UI plugin 3-6 alwaysopen false autoheight true false 3-7 alwaysopen false autoheight 01 03-3 accordion6.html fillspace autoheight clearstyle autoheight navigation accordion6. html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/tr/ html4/strict.dtd"> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="styles/accordiontheme.css"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>jquery UI Accordion Widget Example 7</title> 67

05 01 03 Accordion </head> <body> <div id="myaccordion"> <span class="corner topleft"></span><span class="corner topright"></span> <span class="corner bottomleft"></span><span class="corner bottomright"> </span> <div><a id="header1" href="#1">header 1</a><div>Wow, look at all. <div><a id="header2" href="#2">header 2</a><div>Lorem ipsum.. <div><a id="header3" href="#3">header 3</a><div>Donec at dolor ac... <script type="text/javascript" src="jqueryui/jquery-1.2.6.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.accordion.js"></script> <script type="text/javascript"> //function to execute when doc ready $(function() { //configure accordion var accopts = { event:"mouseover", active:"#header3", alwaysopen:false, autoheight:false, navigation:true //turn specified element into an accordion $("#myaccordion").accordion(accopts); </script> </body> </html> 68

05 jquery UI plugin href navigation href href URL 3-4 destroy destroy 01 03-4 accordion7.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/tr/ html4/strict.dtd"> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="styles/accordiontheme.css"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>jquery UI Accordion Widget Example 8</title> </head> <body> <div id="myaccordion"> <span class="corner topleft"></span><span class="corner topright"></span> <span class="corner bottomleft"></span><span class="corner bottomright"> 69

05 01 03 </span> <div><a href="#">header 1</a><div>Wow, look at all this <div><a href="#">header 2</a><div>Lorem ipsum dolor <div><a href="#">header 3</a><div>Donec at dolor <button id="accordionkiller">kill it!</button> <script type="text/javascript" src="jqueryui/jquery-1.2.6.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.accordion.js"></script> <script type="text/javascript"> //function to execute when doc ready $(function() { //turn specified element into an accordion $("#myaccordion").accordion(); //attach click hander to button $("#accordionkiller").click(function() { Accordion //destroy the accordion $("#myaccordion").accordion("destroy"); </script> </body> </html> <body> <button> <script> <button> jquery click() accordian() destroy 70

05 jquery UI plugin accordion8.html enable disable destroy accordion8.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/tr/ html4/strict.dtd"> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="styles/accordiontheme.css"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>jquery UI Accordion Widget Example 9</title> </head> <body> <div id="myaccordion"> <span class="corner topleft"></span><span class="corner topright"></span> <span class="corner bottomleft"></span><span class="corner bottomright"> </span> <div><a href="#">header 1</a><div>Wow, look at all this <div><a href="#">header 2</a><div>Lorem ipsum dolor sit... <div><a href="#">header 3</a><div>Donec at dolor ac.. <button id="enable">enable!</button><button id="disable">disable!</button> <script type="text/javascript" src="jqueryui/jquery-1.2.6.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.accordion.js"></script> <script type="text/javascript"> //function to execute when doc ready $(function() { 01 03-4 ID //turn specified element into an accordion 71

05 01 03 Accordion $("#myaccordion").accordion(); //add click handler for enable button $("#enable").click(function() { //enable the accordion $("#myaccordion").accordion("enable"); //add click handler for disable button $("#disable").click(function() { //disable the accordion $("#myaccordion").accordion("disable"); </script> </body> </html> destroy accordion() enable disable accordion9.html Enable! 72

05 jquery UI plugin html4/strict.dtd"> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="styles/accordiontheme2.css"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>jquery UI Accordion Widget Example 10</title> </head> <body> <div id="myaccordion"> <span class="corner topleft"></span><span class="corner topright"></span> <span class="corner bottomleft"></span><span class="corner bottomright"> </span> <div><a href="#">header 1</a><div>Wow, look at all this. <div><a href="#">header 2</a><div>Lorem ipsum dolor <div><a href="#">header 3</a><div>Donec at dolor ac <button id="enable">enable!</button><button id="disable">disable!</button> <script type="text/javascript" src="jqueryui/jquery-1.2.6.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.accordion.js"></script> <script type="text/javascript"> //function to execute when doc ready $(function() { 01 03-4 HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/tr/ <!DOCTYPE //turn specified element into an accordion $("#myaccordion").accordion().addclass("enabled"); //add click handler for enable button $("#enable").click(function() { //alert if already enabled, enable and change classes if not ($("#myaccordion").hasclass("enabled"))? alert ("Accordion already enabled!") : $("#myaccordion"). accordion("enable").addclass("enabled"). removeclass("disabled") ; 73

05 01 //add click handler for disable button $("#disable").click(function() { 03 </script> </body> </html> //alert if already disabled, disable and change classes if not ($("#myaccordion").hasclass("disabled"))? alert ("Accordion already disabled!") : $("#myaccordion"). accordion("disable").addclass("disabled"). removeclass("enabled") ; Enable! Disable! enabled disabled Accordion jquery addclass() enable JavaScript ternary enable jquery hasclass() alert addclass() removeclass() Enable! accordion10.html disabled accordiontheme.css 74

05 jquery UI plugin.disabled a { background:url(../img/accordion/disabled.gif) repeat-x 0px 0px; cursor:default;.disabled a.selected { background:url(../img/accordion/disabled.gif) repeat-x 0px 0px; cursor:default;.disabled a:hover { background:url(../img/accordion/disabled.gif) repeat-x 0px 0px; cursor:default; accordiontheme2.css <head> disable! selected hover activate accordion10.html 01 03-4 disabled state */ /* <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/tr/ html4/strict.dtd"> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="styles/accordiontheme2.css"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>jquery UI Accordion Widget Example 11</title> </head> <body> <div id="myaccordion"> <span class="corner topleft"></span><span class="corner topright"></span> <span class="corner bottomleft"></span><span class="corner bottomright"> 75

05 01 03 </span> <div><a href="#">header 1</a><div>Wow, look at all this. <div><a href="#">header 2</a><div>Lorem ipsum dolor.. <div><a href="#">header 3</a><div>Donec at dolor ac. <p>choose a drawer to open</p> <input id="choice" type="text"><button id="activate">activate</button> <script type="text/javascript" src="jqueryui/jquery-1.2.6.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="jqueryui/ui/ui.accordion.js"></script> <script type="text/javascript"> //function to execute when doc ready $(function() { //turn specified element into an accordion $("#myaccordion").accordion(); //add click handler for activate button $("#activate").click(function() { Accordion //get the value from the text box var choice = $("#choice").val(); //open the chosen drawer $("#myaccordion").accordion("activate", choice - 1); </script> </body> </html> accordion11.html activate destroy accordion() activate JavaScript activate 1 76