add remove class

64 views
Skip to first unread message

PedroR

unread,
Jan 17, 2012, 7:19:30 AM1/17/12
to cufón
Hi.

I built a function that add or remove the class active to a menu that
I have. The difference between active its just the color.

I have the following code:

$('.collSex a').click(function(){
$('.collSex a').removeClass('active');
$(this).addClass('active');
});

In fact it works but the color is doesnt change. I mean: The
class .active is added to the selected link but the color doesn't
change.

When cufon isn't applied to this content the it works in a perfection,
The class is added and removed and the color changes too.

Any Ideas where I could correct this

Thanks

Simo Kinnunen

unread,
Jan 17, 2012, 5:25:13 PM1/17/12
to cu...@googlegroups.com
Hi,

You will need to call Cufon.refresh() after changing the class. See https://github.com/sorccu/cufon/wiki/API

Simo

--
You received this message because you are subscribed to the Google Groups "cufón" group.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cufon+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cufon?hl=en.


PedroR

unread,
Jan 18, 2012, 4:44:32 AM1/18/12
to cufón
Thanks. It worked. But the the slide animation that occurs when I
click in one of the links becomes less fluid. I'll try to solve it in
any way.

Thanks
Reply all
Reply to author
Forward
0 new messages