FreelanceSwitch Hello We are a Community of Freelancers. On this site
you'll find Advice, Jobs, Resources and much more!
The Blog Job Board Freelance Book Forums Podcasts Resource Directory

Hide-and-reveal function for WordPress

When

Posted on 20 June 2008

Company

Django Labs

Job Details

We’ve moved an instructional site into WordPress. The site includes many questions for the user to consider; the answers or suggested ideas were previously hidden with “twisty” code:

http://www.twiki.org/cgi-bin/view/Plugins/TwistyPlugin

We’d like to be able to use a similar approach to hide and reveal content on the WordPress site.

We don’t need all the options listed in the twisty page above. We just need to be able to:

- Provide a link that dynamically reveals or hides HTML content that is stored on the same page as the link. The link does not open a new page or popup window. We want the revealed content to be easy to edit and stored with the main page content rather than in a separate file, which is why we liked the previous twisty code. The content that will be revealed includes both text and images.

- Change what the link text says (the hidelink and showlink features in the above site). We need the link to say whatever we want each time we use it.

- Include a small image that will indicate whether the content is hidden or revealed (showimgleft and hideimgleft in the previous twisty plugin). We just need the code, not the image.

If there’s a better way than using Javascript, we’d be happy to consider it. We don’t really care how the effect is achieved; we just need it to be:

- Easy to use in WordPress

- Portable, so we can move it to the final theme for the WordPress site (the current site is in beta with a temporary design)

- Usable by people who will be accessing the internet through corporate filters. So far, these people have not had trouble with the twisty code.

Ideally, the solution would be Section 508 compliant, but that’s not an absolute requirement.

Contact Details are only available to subscribed members. Get a subscription for just $7 a month