In case I write long articles I always make a nice index by hand so the user knows what to expect reading the article. It’s a lot of work to do this by hand so therefore I’ve written a Mootools class witch automatically creates an index of all the h2 elements in the content.

View example Download file

The html

Short but powerfull!

The usage

window.addEvent('domready', function() {
	var index = new cvIndex({
		index: 'indexid',
		url: 'pagina url hier'
	});
});

Update 11-3-2009
To make the index even more usefull I’ve written a php script to create the index. This is a faster method than doing it by javascript. Check it out!

Related Posts

Leave a Comment

Get your own Gravatar!
Your email will never be published!

Notify me of followup comments via e-mail

Top of Page