REVISED
I've been exploring various options and attempting to create a solution, but I'm struggling with it... Do you think it's feasible to achieve this?
<button>Button</button>
<div id='myDivId'>
<div class="progress"></div>
<div class="content">
DIV
</div>
</div>
$("button").click(function(){
$('.progress').animate({ width: '100%' }, 10000);
});
#myDivId{background:red; color:white; padding:10px; overflow:hidden; position:relative;}
.content{
z-index:9;
position:relative;
}
.progress{
z-index;1;
width:0px;
height:100%;
position:absolute;
background:blue;
left:0px;
top:0px;
}
Rather than altering the background color, is there a way to dynamically change the text color instead?