Difference between revisions of "Template:NYU-AD"

Line 135: Line 135:
 
</div>
 
</div>
 
</nav>
 
</nav>
 +
 +
<script type="text/javascript">
 +
 +
$(document).ready(function(){
 +
 +
$(window).scroll(function() {
 +
if ($(document).scrollTop() > 50) {
 +
// alert('you');
 +
$('nav').addClass('shrink');
 +
$('#nyuad-logo').css("height","44px");
 +
 +
} else {
 +
$('nav').removeClass('shrink');
 +
$('#nyuad-logo').css("height","66px");
 +
}
 +
});
 +
});
 +
</script>

Revision as of 21:15, 4 October 2016

iGEM NYUAD Wiki $(document).ready(function(){ $(window).scroll(function() { if ($(document).scrollTop() > 50) { // alert('you'); $('nav').addClass('shrink'); $('#nyuad-logo').css("height","44px"); } else { $('nav').removeClass('shrink'); $('#nyuad-logo').css("height","66px"); } }); });