I use the code below to add the div class .tiny to the div id #header-wrap and .tiny2 to #whole when a user scrolls down 5 pixels or more on a page. I swear this worked in the past, but no longer seems to work. (Running it here: http://themeforward.com/demo2/practice-areas/)
My javascript skills are horrible, so maybe I just messed something up?
`
<script type=”text/javascript”>
$(window).scroll(function() {
var hi = $(document).scrollTop(); if (5 > $(document).scrollTop()) {
$(‘#header-wrap’).removeClass(‘tiny’);
} else { $(‘#header-wrap’).addClass(‘tiny’); }});
$(window).scroll(function() {
var hi = $(document).scrollTop(); if (5 > $(document).scrollTop()) {
$(‘#whole’).removeClass(‘tiny2’);
} else { $(‘#whole’).addClass(‘tiny2’); }});
</script>
`