has anyone come accreoss a plugin or devised a way to fade to pseudo classes defined via css using jquery?
I can't find anything online that suggests there is a plugin that does what I'm thinking, which is kinda weird as I thought this would be a web designer's/dev's dream come true! So I can only assume it's not possible.
say we have
p:hover{opacity:0.6;}
<p>blah blah blah</p>
obviously this is just going to jump from fully opaque to 60% opaque, but if we were to use jquery like so;
$('p').hover(function(){
$(this).animate({'opacity':0.6},400);
},function(){
$(this).animate({'opacity':1},200);
});
We get a nice transition between fully and semi opaque.
What I would REALLY like to figure out is if jQuery can automagically do the transition to the :hover psuedo class defined in the style sheet.
Does jQuery (or javascript) have access to that data from the browser? If not, can the css file be read by javascript or jquery seperately? In either scenario, could jquery (given a few parameters) know that it should always animate to the :hover class?