Search code examples
htmlcsshovercufon

Cufon hover stays in hoverstate on mouseout


http://www.basenharald.nl/3d

Hover the buttons. What i want is that the cufon text changes to #e90c00. For some reason (sometimes) when i move my mouse off the button it stays #e90c00.

This is the code that i use:

Cufon.replace('#nav li a span', {  hover: true, hoverables: { span: true}, textShadow: '#353535 1px 1px'} );

Does anyone know how i can fix this?


Solution

  • Solved the issue:

    $('#nav li').hover(function(){ 
        $('a span', this).css('color','#e90c00'); 
        Cufon.refresh('#nav li a span'); 
    
     },function(){ // this is the mouse out 
    
        $('a span', this).css('color','#fff'); 
        Cufon.refresh('#nav li a span'); 
    });