is there an event for normal text hilighting?
- (t = $("#contents .chapter")).click(zoomfunc = function(evt) {
alert(evt);
if(this != zoomednode) {
var zoom, depth, t;
if(!zoomednode)
zoomednode = $(this).parents("ul")[0];
t = depth = $(this).parents("ul").length;
zoom = 130;
while(--t > 0)
zoom *= 1.15;
zoom += '%';
depth -= $(zoomednode).parents("ul").length;
if(depth < 0)
depth *= -1;
zoomednode = this;
$(contents).animate(
{ fontSize: zoom },
45+45*depth, 0,
function() {
}
);
}
})
t.select = zoomfunc;
'select' and 'focus' do not do what I want. The above code zooms hierarchically-arranged chapters in scale to the 'top-most' chapter that was most recently clicked on. I'm seeking an effect where if I CTRL-F in my browser for a chapter and it hilights it, it does the equivilent as if it had clicked on the chapter when hilighting it.