March, 2008


30
Mar 08

Gold Coast Twitter Underground Brigade (GCTUB) 1!

There are a lot of twitter meet ups around the world these days, but unfortunately there isn’t one on the Gold Coast (Australia); so Kahunagirl and I decided to organize the first Gold Coast Twitter Underground Brigade (GCTUB) for our lovely city. We will be having the first meet up at an awesome new put in Varsity Lakes called Hotel CBD. The details are as follows:

Location: Hotel CBD, in the lounge bar area (next to the bistro).
Address: Cnr Lake Street and Varsity Parade, Varsity Lakes, QLD, 4227
Date: Wednesday, April 2, 2008
Time: 7:30pm to around 8:30pm
Dress Code: No singlets/thongs/shorts (not my decision, the pub has a dress code)
Age: 18+ (the next one will be more underage friendly)
Everyone is welcome to attend, if you wish to get more up to date updates, follow either myself or kahunagirl on twitter. If you don’t use twitter, then you can join the facebook event. I will upload photos after the event to my flickr page and this blog post.

Don’t be shy, it is a great opportunity to network with like minded individuals. Hope to see you there!


22
Mar 08

Melbourne Formula 1 Grand Prix

Last week my father and I went to the first round of the  2008 Formula 1 Grand Prix season in Melbourne.  I had a fantastic time watching the race and checking out all the off track activities. There was historic and modern car exhibitions  in the middle paddock which had cars such as the Bugatti Veyron, old Brabbham cars and a lot of others.

As they are planning to move the Formula 1 from Melbourne to another location, it was a great experience to see it live. I think the last race at Melbourne will be in 2010, and I’d definitely recommend it to anyone who follows F1, but hasn’t been to a race

I have posted my pictures to flickr, but you can also check some of the images out below.


3
Mar 08

jQuery fadeIn/fadeOut IE cleartype glitch

While using the jQuery  javascript library today at work, I noticed a glitch under IE7. When fading a html node with the .fadeIn() and .fadeOut() functions in jQuery, IE drops the windows Cleartype rendering; which results in very ugly text. This problem appears to be very common, but no one has a nice solution for the problem.

The most common way to solve this problem is by removing the filter CSS attribute. In normal javascript, it would look like this:

document.getElementById('node').style.removeAttribute('filter');

and in jQuery, it would look like this:

$('#node').fadeOut('slow', function() {
   this.style.removeAttribute('filter');
});

This means that every single time we want to fade an element, we need to remove the filter attribute, which makes our code look messy.

A simple, more elegant solution would be to wrap the .fadeIn() and .fadeOut() functions with a custom function via the plugin interface of jQuery. The code would be exactly the same, but instead of directly calling the fade functions, we call the wrapper. Like so:

$('#node').customFadeOut('slow', function() {
   //no more fiddling with attributes here
});

So, how do you get this working? Just include the following code after you include the jQuery library for the added functionality.

(function($) {
	$.fn.customFadeIn = function(speed, callback) {
		$(this).fadeIn(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	$.fn.customFadeOut = function(speed, callback) {
		$(this).fadeOut(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
})(jQuery);

I have been informed by Steve Reynolds that the US Whitehouse Website is using some of the JS documented on this blog post. I would just like to say thanks to everyone who contributed in the comments. :)