javascriptjquerycsscufon

Cufon textShadow + hover problem


I only want the text-shadow to be on the hover state.

**JS**
Cufon.replace('.headerright', {hover: true,'fontFamily' : 'League Gothic',textShadow:'0px 1px #cccccc'});
**CSS**
.headerright{text-transform:uppercase; font-size:76px;color:#CD7674;}
.headerright a:hover{color:#444444;}

Solution

  • Your code is defining textShadow from the get-go rather than for the hover event.

    Looking at https://github.com/sorccu/cufon/wiki/styling, this should work for you:

    Cufon.replace('.headerright', {
        'fontFamily': 'League Gothic',
        hover: {
            textShadow: '0px 1px #cccccc'
        }
    });