My jQuery mini logo

Monday, September 20th, 2010

The other night I wanted to add a mini ‘Daniel Stuart’ logo on my site’s top navigation bar. The idea was that this would maintain my branding but the real magic is to only show the mini logo once the user scrolls passed the large logo.

A look at the xHTML

Below is a look at the xHTML placed in the top bar. I have set the display to none so it does no show up initially.

<div id="miniLogo" style="display: none">
	<a href="http://danielstuart.ie">
		<img src="images/miniLogo.png" alt="Daniel Stuart"/>
	</a>
</div>

jQuery to the rescue

I have used scrollTop() to determine how far down the user has scrolled. According to my template design, I want the logo to fade in when the user has scrolled down 100 pixels or more. Also, I want the logo to fade away when the user scrolls back up to the top.

I have set up a boolean variable to check it the user has scrolled past the main logo as I only want to initiate fadeIn and fadeOut once.

I also used jQuery.noConflict(); to avoid any issues with any other scripts I am using.

var $scrolled = new Boolean(false);
jQuery.noConflict();
jQuery(window).scroll(function () {
	position = jQuery(window).scrollTop();
	if(position >=100 && $scrolled == false){
		$scrolled = new Boolean(true);
		jQuery('#miniLogo').fadeIn('slow', function() { });
	}else if(position <100 && $scrolled == true){
		$scrolled = new Boolean(false);
		jQuery('#miniLogo').fadeOut('slow', function() { });
	}
});

So check it out above, scroll down a bit past the main logo and watch the magic happen!

Adobe After Effects Earth Zoom from Dun Laoghaire Marina

Wednesday, August 4th, 2010

Decided to do another one of those tutorials from VideoCopilot. This time I attempted the earth zoom. I took some snapshots of Google Earth at various altitudes and in the tutorial you are shown how to put these all together and create the effect.  The zoom starts at Dun Laoghaire Marina and pulls out to space. Enjoy!

Here’s the Marina on Google Maps


View larger map

Adobe After Effects Particle Explosion Title HD

Wednesday, August 4th, 2010

Decided to spend a few hours this evening mucking about with Adobe After Effects. I headed over to VideoCopilot.net and came across this title tutorial. He’s got some really nice tutorials up there and he talks you through every step. Just make sure you have the pause button ready and alt+tab back and forth from your browser of choice to After Effects!

Sock Guinness

Thursday, July 22nd, 2010

I’m just back from a cycle and I just realised that my right foot kind of resembles a pint of Guinness. Must have looked funny to drivers while waiting first in the queue at the lights with my foot propped up on the pedal :) I’m also sporting my new shoes that my girlfriend got me for my birthday!

Birthday Present from Tara, my 4 year old Niece

Tuesday, July 20th, 2010

My niece painted this picture for my birthday! Check it out. It’s a little robin.

NZ Ireland

Monday, July 5th, 2010

I was bored and thought it would be cool to replace the colours in the Kiwi flag with the Irish green, white and orange.

Giant Lantern Being set off on Ko Tao, Thailand

Monday, June 7th, 2010

I recently uploaded this video to YouTube. It was taken on new years eve 2009 on Ko Tao in Thailand. To Thai people, lanterns are a sign of good luck and hope. I bet they got a lot of luck out of this one, it’s huge!

My tiny room now has more space

Monday, May 31st, 2010

I recently made a trip to the new Ikea in Dublin last week. I was fed up being stuck in a tiny room with no space for all my stuff, and I have a lot of stuff! I had a look around their website and came across their selection of loft beds. They seemed pretty childlike but after spending some time thinking about them, a loft bed would give me a lot more floorspace.

I finally decided on this one and I’m really happy with it, although it took about 4 hours to put together with my girlfriend. Not to mention losing my temper a few times with the stress of trying to make heads or tails of the instructions.

I also got a few other things too; new shelf, clothes organiser, table for the telly and some hooks to mount my snowboard on the wall. It took a bit of time and a few headaches thinking about the layout of everything but I finally got there! It’s one hell of a pad

Take the tour

I took some photo’s with the fisheye to help make it look a bit bigger, take a look.

New Zealand Scrolling Panoramas

Thursday, April 29th, 2010

I recently put put together 10 panoramas from around New Zealand with Photoshop’s photomerge automation. This is a great tool for putting these shots together if your camera doesn’t have an in built panorama mode. I have a basic digital camera too (FUJIFILM FinePIx Z20fd) so I’m happy to get some impressive amateur panoramic photos from it. (more…)

White Water Rafting in Rotorua, New Zealand

Wednesday, April 28th, 2010

I put together a little video slideshow from the photos we got when we went rafting in Rotorua, New Zealand. I saved it in HD so you should check out the full quality version!

The whole thing lasted about 30 minutes and it was so much fun! The guys who ran it were great craic too…. utter lunatics!