Cufon and jQuery event

25 views
Skip to first unread message

tsiger

unread,
Dec 23, 2009, 7:48:20 AM12/23/09
to cufón
Hello,

I have a set of title in a jQuery Accordion and i use the click event
to show hide things.
The other things that i want for my titles (i am using cufon) to
change color on click. is it possible?

something like

$("#title").click(function () {

// do some cufon magic?

});

Simo Kinnunen

unread,
Dec 25, 2009, 10:30:12 AM12/25/09
to cu...@googlegroups.com
Hi,

Yes, assuming it works without Cufón (i.e. it's CSS-based), the
following should do it:

$('#title').click(Cufon.refresh);

(see Cufon.refresh() at http://wiki.github.com/sorccu/cufon/api)

Otherwise you can use something like this:

$('#title').click(function() {
Cufon.replace('selector', { color: 'red' });
});

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
> .
>
>

Reply all
Reply to author
Forward
0 new messages