views:

835

answers:

2

Could someone help me rewrite this syntax below to get it right.

I want the font to be replaced by my font whilst accepting the :hover so my button will change when i hover over it.

 Cufon('button', {
    fontFamily: 'Disgrunged A',
    hover: {
        color: '#ed1c24'
    }
 });
A: 

i don't know cufon, but i think the syntax has to be like this:

 Cufon.replace('button:hover', {
    fontFamily: 'Disgrunged A'
 });
oezi
Unfortunately that didnt work :( That would indicate the cufon only be applied on hover.
Andy
+1  A: 

You could try to add button to hoverables list

Cufon('button', {
    fontFamily: 'Disgrunged A',
    hover: {
        color: '#ed1c24'
    },
    hoverables: { button:true }
 });

Ref: Cufon API

hoverables
Defines which elements :hover is used with. Defaults to links only as IE6 can’t handle anything else.
example : { tag: true, .. }
default : { a: true }

S.Mark
Thanks mate, i put this in about ten minutes ago :p Thank you for your efforts. Its spot on.
Andy
You're welcome @Andy
S.Mark