Created
April 26, 2016 21:53
-
-
Save phsantiago/16d09365c0502886928e3d2569e582fa to your computer and use it in GitHub Desktop.
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() { | |
var _width = $('#logo').width(); | |
var _min = 105; | |
function parallax(s){ | |
width = _width - ($(window).scrollTop() / 0.5); | |
if( width > _min){ | |
$('#logo').css('width', width + 'px'); | |
}else{ | |
$('#logo').css('width', _min + 'px') | |
} | |
} | |
$(window).scroll(parallax); | |
$(window).trigger('scroll'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment