More unobtrusive JavaScript goodies

If you want unobtrusive JavaScript on your page and don’t know where to start, try my recently updated Performer library.

It gives you a good selection of many of the basic features you want from JavaScript – easy AJAX, toggling the visibility of elements, resizing elements and many more. And all of that is done in an unobtrusive, degradeable way so if the visitor doesn’t have JavaScript they can still use your pages.

I’ve recently added two more functions:

Editor
Turns any simple text element (H1, H2, blockquote and many more) into an inline form when the text is clicked. This allows you to provide in-place editing for short pieces of text (usernames, password etc.).
Prompter
Adds a piece of text to a textarea or input type="text" element to prompt the user on what they should type in. The text disappears when they click into the element, and reappears if the box is still empty when they click out.

See demos of all the functions here, along with full documentation and the Performer JavaScript file.

One thought on “More unobtrusive JavaScript goodies

  1. Don’t beat me too hard, but I use Dreamweaver…… and I produce lots of nice bloated code!! For everything else I let “blogger” take the strain, and simple things like spellchecking add code to mark the corrections……. unbelievable but true.

    I’m rubbish I know.

    FoX

Comments are closed.