Interactive collections · practical guide
Build and export a jQuery accordion collection with Foldstead
An expanding collection can give a few projects or editorial stories their own space without building a whole site. Foldstead is a free jQuery accordion kit with a visual builder, four original illustrated stories, an editable JSON project and a self-contained HTML output.
For a quick start, open the builder before downloading the full kit. Save an editable JSON file to keep a copy of your work.
Use the builder to prepare the content, save a project you can reopen, then download a finished interactive page. The exported page contains the collection, rather than the workshop controls. It is a source component kit; it does not provide a server, login, publishing service or checkout.
Open the prebuilt workshop
Get the kit from the Foldstead product page, extract the ZIP and open app/index.html. The prebuilt offline workshop does not need an account, build or internet connection. If your browser blocks local downloads, use the documented local server from the extracted folder: python3 -m http.server 8080 --bind 127.0.0.1, then open http://127.0.0.1:8080/app/. Follow normal browser security controls.
The four supplied stories and vector landscapes are original examples. Edit their text and choose from the included illustrations; arbitrary HTML or SVG uploads are not supported.
Try a small collection you can verify
- Set the collection title to Open studio weekends. Keep the Gallery style, duration at 450 milliseconds, rotation interval at 5,000 milliseconds and the first panel as the initial story.
- Select the first panel. Change its title to Meet the potter and its description to A quiet Saturday visit to the ceramics studio. Explore the process, the tools and the finished collection.
- Choose Apply changes. This commits the valid fields together. Unapplied edits are deliberately excluded from previews and exports; invalid fields preserve the last applied collection.
- Choose Save JSON project, then Download HTML. Keep both files: they have different purposes.
- Open the JSON through Open project when you want to edit again. Open the downloaded HTML separately to check the finished collection and its controls.
This example is tied to an actual browser check of the current kit. The saved JSON contained the title and description above. The saved, reopened and post-invalid-input project files were identical at 1,432 bytes. The separately opened HTML was 102,716 bytes and retained working panel controls. Those sizes describe this specific checked example.
Keep editable work and finished output separate
| File | What it preserves | Next step |
|---|---|---|
| JSON project | Editable content, panel order and collection options. | Open it in the workshop to continue editing. |
| Downloaded HTML | A finished interactive collection with its bundled artwork, CSS, jQuery, plugin and options. | Open it in a modern browser or place it on your own site after checking it. |
There is no automatic storage. Save JSON before closing the tab. Undo and Redo keep up to 40 applied versions during the current tab session, and removing a panel is undoable. A downloaded backup is the recovery path after the tab is gone.
Open project rejects unsupported, malformed, unsafe-link or oversized files without replacing the applied collection. The project limit is 64 KB. In the checked example, importing an invalid JSON file showed a rejection message and the next saved backup remained identical to the original.
Check reading and keyboard behavior
Enhanced mode expands exactly one panel at a time. Click a closed story heading, or use Arrow Right/Down and Arrow Left/Up to move through stories. Home and End reach the ends of the collection; Enter or Space activates the focused native button. The actual example was checked with Arrow Right in the workshop and End in the finished HTML.
Gallery layouts stack below 700 pixels. Check the actual page where you will use the collection; make sure the open story remains readable, links work and focus stays visible. The current independent check includes desktop and 390-pixel output. That is separate from physical-touch, every-browser-engine or full assistive-technology certification.
Autoplay starts off. Play collection requests rotation; it runs only while the collection is not hovered or focused, the document is visible and reduced motion is not requested. Pause stops it. A manual panel click or arrow action pauses rotation, so navigation does not keep moving while a reader interacts.
Use the plugin inside an existing jQuery page
For an existing site, use the component files and the markup shape in samples/embed.html. Copy app/foldstead.css and app/jquery.foldstead.js, load jQuery first, then load the plugin after the DOM. The kit includes jQuery 3.7.1; on a site that already has compatible jQuery, use the individual files instead of loading the whole workshop runtime again.
$('.my-collection').foldstead({
initial: 0,
duration: 450,
interval: 5000
});
// Plugin index 2 selects the third panel.
$('.my-collection').foldstead('open', 2);
The builder labels panels starting at 1; plugin methods and options use indexes starting at 0. Keep heading levels appropriate to the surrounding page. Before enhancement, the supplied markup exposes all bodies and text. Do not add hidden states before initialization.
Each initialized collection has its own state, timer and event namespace. The included two-collection example demonstrates independent instances. The state getter returns a fresh object for the first matched instance, and destroy removes timers and listeners and restores original markup, classes and styles. Invalid methods, timing values or indexes throw without mutating initialized components.
Scope, rights and practical limits
Collections contain 2–12 panels. Duration accepts 0–1,200 milliseconds; the rotation interval accepts 2,000–15,000 milliseconds. User-chosen links must be HTTP(S) without embedded credentials. The editor does not fetch them, so check the real destinations yourself. Text is escaped and the builder does not accept arbitrary HTML or SVG uploads.
The complete base kit is free, with no paid base tier or payment form. Its included license permits personal and commercial project use and sharing finished output; reselling or redistributing the source package as a standalone product and claiming authorship are excluded. jQuery’s MIT notice remains separate. Individual support, an SLA, an update timetable and results are not guaranteed.