30 Mar, 2009

How to make a beautiful portfolio gallery using jQuery Animate !

Posted by: Mahbub In: misc

Doing a portfolio page with Flash on your website has become kind of obsolete. These days with Faster machines and new generation browser can really kick some ass with Javascript and CSS.  JQuery has very neat way to deal with some effects. All the animations stem from the base method called “animate”. It animates, tweens the properties of DOM elements. To make the long story short take a look at this.

portfolio_demo

So, you have already clicked and saw right? Ok, if you look at the code, it’s fairly simple.

	$(document).ready(function(){
		var hover_in_easing="easeOutExpo";
		var hover_out_easing="easeOutBounce";
		$(".info_container").show();
		$("div.portfolio_div").hover(function(){
			$(this).find(".info_container").animate({top:"0px"},{duration: 400, easing: hover_in_easing});
		},function(){
			$(this).find(".info_container").animate({top:"100px"},{duration: 500, easing: hover_out_easing});
		});
                // The 100 px is the size of the mask
	});

It uses animate function to animate the mask over the image which is kept hidden by positioning relatively. And with easing plugin, we achieve some cool effect of bouncing when you hover out from the image.  You can put any html inside the info_container DIV elements as long as it doesn’t go beyond the borders. Look at the stylesheet and you’ll find it very gramatical. You can customize the sizes by modifying the div classes.

Download the Source

Inspiration : http://dibusoft.com/portfolio

11 Responses to "How to make a beautiful portfolio gallery using jQuery Animate !"

1 | Mike

April 21st, 2009 at 3:01 pm

Avatar

This is great; I saw your link at the build internet blog and will give this script a shot as well as theirs. Nice job.

2 | claudio

June 15th, 2009 at 11:05 am

Avatar

Also found your link over at build internet blog. Will use one of those for sure on my new portfolio page. Congrats and thank you!

3 | Paolo

March 29th, 2010 at 8:54 pm

Avatar

how do i implement this with jquery lightbox? can you help me out?

4 | lorembolo

August 3rd, 2010 at 1:45 pm

Avatar

It’s cool and simple. I got the same need as Paolo : is ther a way to make this working with a lightbox gallery ?

5 | ZoOL

September 4th, 2010 at 4:55 am

Avatar

Is it possible to put this into blogger? I tried but i can’t get it to work.

6 | Finally! Security Speakers Bureau is done! « After Zain Sleeps

January 20th, 2011 at 5:42 am

Avatar

[...] for the featured photos on the index page, I modified this script from jquerymagic. It was written by Mahbubur [...]

7 | php open source

May 5th, 2011 at 1:02 pm

Avatar

Great script for the gallery thanks for sharing…

10 | Daniel

July 18th, 2011 at 7:59 pm

Avatar

excellent post, simple but effective ideas. much appreciated

11 | Ryan King

September 18th, 2011 at 12:32 pm

Avatar

i am working on my new site and i would like to insert this in to the current site design i have done how would i go about doing this as i am not sure what i am doing

Comment Form


Translator

English flagItalian flagKorean flagChinese (Simplified) flagChinese (Traditional) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroatian flagDanish flagFinnish flagHindi flagPolish flagRomanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flagSlovenian flagUkrainian flagVietnamese flagAlbanian flagEstonian flagGalician flagMaltese flagThai flagTurkish flagHungarian flag

Tags