Remove double negative

This commit is contained in:
Jake Howard 2015-08-13 14:47:50 +01:00
parent 3dfc928f1f
commit 6ba53c9136

View file

@ -15,7 +15,7 @@ var Parallax = {
window_top = $(window).scrollTop(); window_top = $(window).scrollTop();
window_bottom = window_top + $(window).height(); window_bottom = window_top + $(window).height();
$(this.ident).each(function(){ $(this.ident).each(function(){
if (!is_on_screen(this) || !$(this).attr('parallax-offset') != false) { return; } if (!is_on_screen(this) || !$(this).attr('parallax-offset')) { return; }
element = $(this); element = $(this);
center_pos = (element.offset().top - $(window).scrollTop()) + (element.height() / 2); center_pos = (element.offset().top - $(window).scrollTop()) + (element.height() / 2);
perc = -(0.5 - ((window_top - center_pos) / window_bottom)); perc = -(0.5 - ((window_top - center_pos) / window_bottom));