Do you mean something like this? uses only css to flow the text over it, no need for javascript in this example ;-) but you could always switch out classes with desired effect and such.
What it does is uses the transition property that allows it to animate inbetween different css states after an event like hover, click active and such.
To highlight a part of a letter, you need to add that HTML element twice. What I have done with coloured and plain. This also counts for individual letters. You need to set them to an absolute position and wrap them in a relative div. By doing that they will position themselves absolutely to the top left location(in my example) of the the relative wrapper div. This way you can keep text flow if you use a <span>
for a wrapper fo example
Then you set one to width 0 or to whatever width you want it to cover up half the other letter
In my example only half of the Y is red, the other half(half ish) is not red.
If you wish to cover a top half you can play with height.
http://jsfiddle.net/L9L8L966/1/
#container {
font-size:40px;
position:relative;
background-color:#CCC;
width:450px;
height:40px;
}
#coloured {
position:absolute;
z-index:2;
top:0px;
left:0px;
display:block;
width:0%;
-webkit-transition: width 1s ease-in-out;
-moz-transition: width 1s ease-in-out;
-o-transition: width 1s ease-in-out;
transition: width 1s ease-in-out;
color:red;
overflow:hidden;
}
#container:hover #coloured {
width:100%;
}
#plain {
position:absolute;
z-index:1;
width:100%;
display:block;
top:0px;
left:0px;
color:black;
}
<div id="container">
<div id="coloured">
abcdefghijklmnopqrstuvwxyz
</div>
<div id="plain">
abcdefghijklmnopqrstuvwxyz
</div>
</div>