Difference between revisions of "Template:AUC TURKEY"
Line 246: | Line 246: | ||
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 | ||
+ | alert(beginning_color.toString()); | ||
$(document).scroll(function() { | $(document).scroll(function() { | ||
var animation_begin_pos = 0; | var animation_begin_pos = 0; | ||
Line 260: | Line 261: | ||
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); | ||
− | |||
} 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:53, 28 June 2015