I have found a jquery code which animates colors. I made a fiddle from it (after minor change), and it's working perfectly on jsfiddle: http://jsfiddle.net/kFuzp/
Unfortunately, it's not working on my Drupal site. I have JQuery Update module and updated to 1.8, using jQuery CDN. The code (as in jsfiddle) is inserted using drupal_add_js ($script1, 'inline')
in mytheme_preprocess_page()
. When I debug the code in Chrome, it just runs (I can observe how the color_index changes etc using breakpoints). But the <p>
background color is always white.
By the way, when I change the animation property to { opacity: color_index/7 }
then the opacity animation is working (slowly) both in jsfiddle and in Drupal.
Why it's not working in Drupal and how to fix it?