Archive for the ‘jQuery’ Category

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…)

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…)

jQuery image gallery

Tuesday, September 30th, 2008

During a recent project I decided to implement an image gallery using jQuery for visual effects. I needed a series of thumbnails that would be clickable to update a full size image using nice fade transitions.

Some Googling unearthed Galleria which looked promising, though upon testing and deploying to a remote site I found it to be a little slow and there were some incompatibility issues with Safari.

Simplified jQuery Gallery

I decided to create an simplified version to cut out the overheads and hopefully speed things up. This relies on a simple HTML <ul> list with embedded thumbnails with title tags to be used for captions - and for the full image a <div> container.

jQuery image gallery

(more…)