Last active
December 18, 2015 01:48
-
-
Save wescleymatos/5706089 to your computer and use it in GitHub Desktop.
Pega a altura das divs e ordena o array de forma descendente.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
var alturaMenu = $("#menu_vertical").height(), | |
alturaUltimasNoticias2 = $("#ultimas_noticias_2").height(), | |
alturaNoticiasDetalhe = $("#noticias_detalhe").height(); | |
var alturas = new Array(alturaMenu, alturaNoticiasDetalhe, alturaUltimasNoticias2); | |
alturas = alturas.sort(function(a,b){return b-a}); | |
console.log(alturas); | |
}); | |
// ou | |
$(document).ready(function() { | |
window.onload = function (){ | |
var alturaContainer = $("#container").height(); | |
var alturaMenu = $("#menu_vertical").height(); | |
var alturaUltimasNoticias2 = $("#ultimas_noticias_2").height(); | |
var alturas = new Array(alturaMenu, alturaContainer, alturaUltimasNoticias2); | |
alturas = alturas.sort(function(a,b){return b-a}); | |
$("#rodape_interno").css("top", alturas[0] + 250); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment