Time to sing and dance with an … errr .. accordion?

My uncle did play the accordion as a young lad but that was long before I was born. Fortunately, the accordions’ I’m referring to here are of a JavaScript nature. Accordion’s are those fancy sliding dividers that let you compress a lot of content behind simple little bars. Tutorial blog has collected a number of different ones for your dancing pleasure. Enjoy.

Out from under the carpet

I’ve been crazy busy lately with projects at We-Create so my RSS feed reader has been quickly filling up with unread posts. I finally took a bit of time tonight to re-visit it and came across a few gems I thought I’d share.

Debugging JavaScript

Jesse Skinner over at The Future of the Web had a great little post on debugging javascript. Basically by adding a simple function to your site:

function debug_mode() {
    return location.hash == '#debug';

}

you can degub any code JavaScript:

if (debug_mode()) {
    alert('alert away!');
}

and all you have to do is add #debug to the URL. Brilliant! That’s kinda an obvious thing to do so I’m not sure why didn’t I think of it. Thanks Jesse.

DOMAssistant 2.0

Robert Nyman wrote me awhile back to let me know that DOMAssistant version 2.0 has been released. New features include:

  • Chainability
  • AJAX Module
  • Easier DOMReady
  • XPath Support

These make for some great additions to the little library, good work Robert and team.

No events with innerHTML

Friendly Bit had a post about events disappearing after using innerHTML to modify the DOM. When you add events using the event attribute and then modify the parent’s innerHTML property, it seems that you’re events all go bye-bye. Check out the article for a better explanation but it’s just another reason to avoid innerHTML altogether.

Tablecloth

Tablecloth

Tablecloth is a nifty little addition to your DOM scripting library that will automagically give your HTML tables a bit of flare. It highlights columns and rows as well as which cells you clicked in a well formatted table. The best part is that it does it all using class names on the table elements so that the style is extracted nicely to the CSS file, not the JavaScript. Check it out.

© Copyright 2007 Jeffrey Sambells.