Archive for October, 2008

Collapsible definition lists with jQuery

Wednesday, October 15th, 2008

Here’s a lightweight snippet for creating a collapsable defintion list. A client wanted a way to present a large page of text with some sections collapsed. The site is also built in CMS so I wanted a solution that tapped into semantic code that would easy to create and edit using a wysiwyg editor. TinyMCE in this case. I’ll set up an example page if anyone wants it. Let me know.

(more…)

Drupal taxonomy term list

Monday, October 13th, 2008

Here’s a useful script for anyone who wants to display a list of terms for any given vocabulary. It seems that many people are asking this question and I’ve seen some very complicated solutions to the problem. However there was one that came very close from tela-web.com

I adapted the script very slightly as I wanted to be able to display a list of terms for a particular vocabulary, but only if a published node had been associated with it. So I added the taxonomy_term_count_nodes() function to check for that.

Drupal categories UI

(more…)

jQuery crashing Safari 2

Friday, October 3rd, 2008

I thought I’d write a specific entry concerning jQuery and Safari 2. Others may be wondering why Safari 2 is crashing when trying to run some elements of jQuery. In a recent project I need to write simple caption strings into a <p> paragraph and was using html().

I first assumed that one of the fade transitions was causing problems (that’s another story!). I eventually narrowed down the problem and found that html() was causing Safari 2.0.4 to crash. In this case it was easy enough to switch to text() to write in the string and that solved it!

(more…)