Archive for the ‘JavaScript’ Category

Thursday, February 25th, 2010

Showing in-page and inline content in Lightbox2

Lightbox2 allows you to load in same-domain content without an iframe using rel=”lightmodal”. What it doesn’t allow you do is use that same mechanism for content already in the page.

Friday, January 22nd, 2010

Fixing Disqus’ thread.js error in IE

Turns out that the default universal code for Disqus won’t work in IE (8 or below at time of writing). The cause is a line (#1189 to be exact) in their thread.js that calls the indexOf method on an array.
As we all know, IE doesn’t support the indexOf method for the Array prototype. The simple [...]

Monday, January 18th, 2010

Avoiding flickering in jQuery when animating elements which contain Flash

jQuery slideToggle or slideDown will cause a Flash movie to flicker if the movie is inside the animated element. A short note on how to fix it.

Wednesday, November 4th, 2009

External Links in New Window. Passive and with MooTools.

Sx
All external links from the site should open in a new window. Do not want to write this on a link-by-link basis. Should be light and unobtrusive. Using MooTools.
Dx
We can easily know what domain the script lives on. Other domains are easily distinguished. Links come and go and are loaded in, sometimes, by other links. We [...]

Wednesday, April 15th, 2009

Mootools 1.2 Horizontal Accordion – the secret revealed

Sometimes the API docs are wrong.
Since I couldn’t find out how to do it, I’ll post the secret here. To make the horizontal accordion work in Mootools 1.2 you have to specify a fixed width. The API docs say it is a Boolean, but it ain’t. It is what the plugin uses to determine the [...]