Skip to content

Instantly share code, notes, and snippets.

@corpix
Created May 12, 2012 00:15
Show Gist options
  • Save corpix/2663260 to your computer and use it in GitHub Desktop.
Save corpix/2663260 to your computer and use it in GitHub Desktop.
Make me wide, make me normal
// Wide
function () {
$(this).find('img.normal').fadeOut(300);
$(this).find('img.wide').fadeIn(300);
$(this).animate({ width: '340px', height: '134px' }, 200);
$(this).parent().animate({ top: '-16px', left: '-17px' }, 200);
$(this).parent().css('z-index', '100');
};
// Normal
function () {
$(this).find('img.normal').fadeIn(300);
$(this).find('img.wide').fadeOut(200);
$(this).animate({ width: '306px', height: '102px' }, 200);
$(this).parent().animate({ top: '0', left: '0' }, 200);
$(this).parent().css('z-index', '');
};
// Together with the absolute, relative of course :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment