I have a container with text content (for example: My Name) and it is displayed in a RED background color along with a button.
What I am looking for :
When the button is clicked, I want to change the background color of the container from RED to BLUE, similar to a progress bar, over a duration of 10 seconds. This should gradually transition the color from start to end within those 10 seconds.
The animation should begin at 0 seconds
=
==
===
====
=====
======
=======
========
=========
==========
end at 10 seconds
I attempted to achieve this using the JQuery animate() method but encountered difficulties.
My Attempt :
$("button").click(function(){
$('#myContainerId').animate({background-color:'blue'},10000);
});
If this approach is not feasible, I would appreciate any recommendations for plugins that can help me accomplish this task.
I am hopeful that our community members will provide guidance on this matter.