Skip to content

Instantly share code, notes, and snippets.

@tarnfeld
Created October 3, 2011 00:15
Show Gist options
  • Save tarnfeld/1258159 to your computer and use it in GitHub Desktop.
Save tarnfeld/1258159 to your computer and use it in GitHub Desktop.
$('#full').scroll(function() {
var el = false;
console.log('-----');
$('.set').each(function(i, e) {
console.log($(e).offset().top - 32);
if (!el && ($(e).offset().top - 32) == 0) {
el = $(this);
}
});
if (el) window.location.hash = $(el).data('hash');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment