Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery ui.progressbar label - Change text color on background passing letter

I have added a label to the jquery ui progressbar using this demo.

What I want to do is change the text color depending on if the progress bar is behind the letter.

How can I tell if that has happened?enter image description here

like image 623
Hailwood Avatar asked Mar 14 '11 01:03

Hailwood


1 Answers

Its kinda ugly but if you duplicate the label, one outside the bar and one inside, and use overflow: hidden you can pull it off:

http://jsbin.com/ohiyo/21/

Only tested in Chrome dev and firefox 4

like image 137
PetersenDidIt Avatar answered Nov 15 '22 04:11

PetersenDidIt