Using jquery and some logic we can make some cool animations. This one shows you how to do a light box effect, which means animating from the center outward. In reality you are just animating from top left to bottom right while moving from bottom right to top left switch(open) {
case "x":
x = $(window).width()/2;
y = $(window).height()/2 - h/2;
startW = x/2 - w;
startH = h;
endTop = y;
endLeft = x - w/2;
break;
case "y":
x = $(window).width()/2 - w/2;
y = $(window).height()/2;
startW = w;
startH = y/2-h;
endTop = y - h/2;
endLeft = x;
break;
case "center":
default:
x = $(window).width()/2;
y = $(window).height()/2;
startW = h-y/2;
startH = w-x/2;
endTop = y - h/2;
endLeft = x - w/2;
break;
}
Watch video Jquery Effect - Advanced Animate from center online without registration, duration hours minute second in high quality. This video was added by user optikalefx 10 September 2009, don't forget to share it with your friends and acquaintances, it has been viewed on our site 22,551 once and liked it 56 people.