Skip to content

Instantly share code, notes, and snippets.

@felipefernandes
Created December 20, 2013 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipefernandes/8055214 to your computer and use it in GitHub Desktop.
Save felipefernandes/8055214 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
var larguraJanela = $(window).width();
// tamanho chave pra mexer no tamanh
if (larguraJanela < 800) {
mudaTamanhoLogo(true);
} else {
mudaTamanhoLogo(false);
}
function mudaTamanhoLogo( estado ) {
if (estado == true) {
$(".logo").stop().animate({
backgroundSize: "50%",
height: "120px"
}, 'easyInOut');
} else {
$(".logo").stop().animate({
backgroundSize: "100%",
height: "238px"
}, 'easyOutIn');
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment