Skip to Main Content
Adding Ajax
book

Adding Ajax

by Shelley Powers
June 2007
Intermediate to advanced content levelIntermediate to advanced
400 pages
9h 52m
English
O'Reilly Media, Inc.
Content preview from Adding Ajax

The New Page View

Eric Meyer, well-known CSS expert and author, created a standards-based, accessible slideshow/presentation code framework called S5: a Simple Standards-Based Slide Show System (hence the 5 in the S5 name). The premise behind the application is to load each page, or presentation slide, into the document and give each a specific class name. When the page is opened, if scripting is enabled, these class names are processed using the DOM and are then "layered" into pages that can be traversed using a navigational aid. S5 also has good keyboard support.

Tip

Read more about S5, see examples, and download code at http://meyerweb.com/eric/tools/s5.

This concept is good because if scripting is disabled, all the pages are displayed, one after another; users can vertically scroll down the page, reading each section in turn. No server-side code is necessary, and the code to manage the dynamic presentation doesn't have to be very complicated.

This isn't technically an Ajax application because we're not using an Ajax call. However, Ajax has broadened to include most dynamic JavaScript functionality, so we'll call the application "Ajax" by marriage.

After pulling apart the Unix command article, we can put it back together again for this next application. The slideshow elements are left as-is, and each of the pages are added below them, each with its own unique identifier and a shared "section" class. The entire page is not duplicated here, as that would be quite large; enough is shown ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ajax: The Definitive Guide

Ajax: The Definitive Guide

Anthony T. Holdener III
Ajax Design Patterns

Ajax Design Patterns

Michael Mahemoff
Web Development with JavaScript and Ajax Illuminated

Web Development with JavaScript and Ajax Illuminated

Richard Allen, Kai Qian, Lixin Tao, Xiang Fu

Publisher Resources

ISBN: 9780596529369Supplemental ContentErrata Page