Last active
November 14, 2016 11:57
-
-
Save diogomachado/4610359 to your computer and use it in GitHub Desktop.
Scroll - Fica rastreando o scroll
This file contains 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 () { | |
// Captura o scroll do mouse | |
$(window).scroll(function() { | |
// Se o valor da rolagem for maior que a div que você apontar: | |
if ($(window).scrollTop() >= $("#divQueVocêQuer").position().top) { | |
// Mostra a barra, ou modifica os atributos | |
}); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment