- jQuery 1.3 with PHP
- Kae Verens
- 331字
- 2021-04-01 13:36:01
Chapter 3. Tabs and Accordions
A tab is a way of separating content, yet keeping it easy to flick from one piece to another, similar to the labels in a binder.
In a web browser's main application, the tabbed areas are completely separate web pages. In a web page, though, the information is usually related, for example various pages of a form.
An accordion is similar to a tab. It separates parts of related data so that only one piece of data is visible at a time. Throughout the chapter, when I speak about tabs, the same information can usually be applied to accordions as well.
The main visual difference between the two is that, with tabs, the handles for flicking between the various pages of data are kept either horizontally or vertically along an edge of the tabbed area. However, with accordions, the handles are more akin to chapter headings, as they are shown interleaved with the pages.
Another visual difference is that with a tab, the tabbed area immediately shifts to the newly selected area, but with an accordion, the shift is shown as an animation—the old page slides closed as the new page slides open.
Accordions are similar to "code folding" in an IDE, in which you open only the part of the data that you're interested in reading, and the rest stays closed until you need it. This makes it very easy to find the piece of data or text that you were looking for, without wading through the rest.
Implementation-wise, the two are similar—you need to display the data, place markers to indicate the page/tab changes, and then run a script to make it all work.
In this chapter, we will have a look at the following points:
- Creating tabs and accordions using jQuery and jQuery UI
- Managing tabs and accordions using a rich text editor and a bit of PHP
- Using Ajax to populate your accordion and tab panels
- Irrlicht 1.7 Realtime 3D Engine Beginner's Guide
- Vue.js框架與Web前端開發從入門到精通
- Adobe Photoshop 網頁設計與制作標準實訓教程(CS5修訂版)
- Midjourney從入門到實戰應用
- 好的PPT會說話:如何打造完美幻燈片
- Excel 2016入門與提高
- ABAQUS有限元分析從入門到精通(第3版)
- Instant Testing with QUnit
- Adobe創意大學Photoshop產品專家認證標準教材(CS6修訂版)
- Photoshop手繪從新手到高手
- Moodle Course Conversion: Beginner's Guide
- Python Testing Cookbook
- Getting Started with Oracle BPM Suite 11gR1 – A Hands/On Tutorial
- 好用,Excel數據處理高手
- MATLAB在日常計算中的應用