Difference between revisions of "Template:AUC TURKEY"

Line 878: Line 878:
 
}( jQuery ));
 
}( jQuery ));
 
     var scroll_pos = 0;
 
     var scroll_pos = 0;
     var animation_begin_pos = 0; //where you want the animation to begin
+
     var animation_begin_pos = 0;  
     var animation_end_pos = 1000; //where you want the animation to stop
+
     var animation_end_pos = Math.max( document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) - window.innerHeight;  
 
     var beginning_color = new $.Color( 'rgb(255,0,0)' ); //we can set this here, but it'd probably be better to get it from the CSS; for the example we're setting it here.
 
     var beginning_color = new $.Color( 'rgb(255,0,0)' ); //we can set this here, but it'd probably be better to get it from the CSS; for the example we're setting it here.
 
     var ending_color = new $.Color( 'rgb(0,0,255)' );//what color we want to use in the end
 
     var ending_color = new $.Color( 'rgb(0,0,255)' );//what color we want to use in the end
Line 894: Line 894:
 
             //console.log( newColor.red(), newColor.green(), newColor.blue() );
 
             //console.log( newColor.red(), newColor.green(), newColor.blue() );
 
             $('body').animate({ backgroundColor: newColor }, 0);
 
             $('body').animate({ backgroundColor: newColor }, 0);
alert(newColor.toString());
+
console.log("ps"+percentScrolled);
 
         } else if ( scroll_pos > animation_end_pos ) {
 
         } else if ( scroll_pos > animation_end_pos ) {
 
             $('body').animate({ backgroundColor: ending_color }, 0);
 
             $('body').animate({ backgroundColor: ending_color }, 0);

Revision as of 08:42, 28 June 2015