Bookmark to del.icio.us
Adding arbitrary links on page that expand/ collapse the contents
Besides having the user explicitly clicking on the headers to show and hide content, you can also add this functionality elsewhere on your page, such as text links that expands a particular header's content, toggle between expand/collapse, or even expand all headers within the same group.
What is Ajax?
Ajax is a group of inter-related web development techniques used for creating interactive web applications. A primary characteristic is the increased responsiveness and interactiveness of web pages achieved by exchanging small amounts of data with the server "behind the scenes" so that the entire web page does not have to be reloaded each time the user performs an action. This is intended to increase the web page's interactivity, speed, functionality, and usability.
The key is to call one of the below functions on your page:
Remote links that expand select headers on the target page
You can define a link on another page that causes the desired headers on the target page (one containing Accordion Content) to expand when the later is loaded. In other words, depending on the referring page, different headers can be expanded by default. This is done by adding to the original link a URL parameter string specifying which headers for which header groups you want to expand. The syntax is:
<a href="target.htm?headerclass=index1,index2,etc">Target Page</a>
The dog is a domestic subspecies of the wolf, a mammal of the Canidae family of the order Carnivora. The term encompasses both feral and pet varieties and is also sometimes used to describe wild canids of other subspecies or species.
The Cat, also known as the Domestic Cat or House Cat to distinguish it from other felines, is a small carnivorous species of crepuscular mammal that is often valued by humans for its companionship and its ability to hunt vermin. It has been associated with humans for at least 9,500 years.
Rabbits are small mammals in the family Leporidae of the order Lagomorpha, found in several parts of the world. There are seven different genera in the family classified as rabbits, including the European rabbit (Oryctolagus cuniculus), cottontail rabbit (genus Sylvilagus; 13 species), and the Amami rabbit (Pentalagus furnessi, endangered species on Amami O-shima, Japan).
The following links (presumably on other pages) causes different headers
within this Accordion content instance to load by default when
<a href="target.htm?mypets=0">Target Page (1st header expanded by default)</a>
<a href="target.htm?mypets=0,2,3">Target Page (1st, 3rd and 4th headers expanded by default)</a>
If your page contains multiple Accordion content instances and you wish to expand certain headers in all of them, you can do that as well:
<a href="target.htm?mypets=2,3&myfamily=1,2,3">Expand headers for multiple Accordion Content instances on target page</a>
The URL parameter method of headers selection overrides both the persisted
header states and default selected headers settings within the script. However,
if you've set
Table Of Contents