Fade between two divs using mootools

MooToolsI’ve been playing with mootools for a while, they’re very nice, making easy work of some nice visual tweens and effects.

One thing I was struggling a bit to do was fade between two divs, having the first one fade out then the second fade in. Rather than grabbing a plugin to do it I wanted a small bit of JavaScript I could embed in a page, I couldn’t find one anywhere.

It’s pretty simple to do, the code below should give you a starting point to set up some JS to fade between 2 or more divs.

function fadeBetweenDivs( div1, div2 ) {
	$$( div1 ).fade( "out" );
	(function(){
		$$( div1 ).setStyles({
			display:	'none',
			opacity:	0
		});
	}).delay( 150 );
	(function(){
		$( div2 ).setStyles({
			display:	'block',
			opacity:	0
		});
	}).delay( 150 );
	$$( div2 ).fade( "in" );
}

That is all,
- Chris

Sequel Pro: Manage MySQL Databases under Mac OS X

Sequel Pro Icon
I do a lot of web development; it’s my full time job, my hobby and a means to potentially earn some money on the side. I need a set of good tools in order to make aspects of the work easier or I’d spend my entire life at odds with what I do. A good Database Management System (DBMS) tool is one such tool since database management and manipulation plays such a large part of developing any content managed website, especially for quick modifications, testing and deployment.

MySQL is my DB of choice, due to working mainly on LAMP architecture systems. The best tool by far I’ve found for managing MySQL databases under Mac OS X is Sequel Pro (previously CocoaMySQL).

Read the rest of this entry »

Connectivity in Social Media

I’ve been playing around with various social media sites lately, trying to integrate them so my wealth of assorted knowledge gets to as many of the various places as possible. My Twitter feed now updates my Facebook and Linkedin statuses; Last.fm scrobbled tracks appear here in the sidebar and on Facebook; Flickr photos appear here as well as on Facebook.

This got me to thinking about the types of people I connect to on each of these social media networking sites. In my eyes this blog serves a different purpose and has a separate target audience to my Linkedin or Facebook profiles.

In light of this I’m giving a rundown of the groups and categories of people I connect to via each of these sites and their envisioned usage in my eyes.

Read the rest of this entry »

Batch renaming files in Mac OS X

NameChangerThe Finder is brilliant. It does exactly what it says on the tin. You can zoom around your filesystem and find things with relative ease; copy, cut, paste and move files. It does it all, but it lacks any batch renaming to help any of us who have the laborious task of renaming dozens, or worse, hundreds of files.

That’s where NameChanger comes in. NameChanger is a piece of free software from MRR Software. Basically it allows you to rename large batches of files with some simple pattern matching.

Read the rest of this entry »

Shopping++

I’ve not posted in ages. Sorry.

Image 1: Shopping++

Shopping++

Just a quick post to say that I’m very impressed with the Sainsbury’s delivery service and web store, much more than the Tesco equivalent.

I got over £100 worth of groceries delivered within the one hour slot I picked, not the 2-3 hour slots that Tesco use, and everything was there, good quality and undamaged.

Not only that but having purchased over £100 worth of shopping the delivery cost is waived. So I managed to get a month worth of food and drink without the hassle of going shopping and somehow carting everything back.

Read the rest of this entry »