Font Replacement for A Hover links?

4 views
Skip to first unread message

zach smith

unread,
Dec 14, 2009, 2:07:12 PM12/14/09
to cufón
I would like to change the color on my font that is being replaced for
a certain a:hover. Is it possible?

Gareth Evans

unread,
Dec 14, 2009, 5:29:47 PM12/14/09
to cu...@googlegroups.com
Hi Zach
 
Yes, Cufon can do this.
 
You need to apply your a:hover class as normal, and in your cufon replace statement, pass hover:true.
Like this:
 
Cufon.replace("body div#container a", { hover : true });
If you're using a dropdown menu, you may need to customize this to refresh the font when you exit a submenu.
 
 

Gareth
On Tue, Dec 15, 2009 at 8:07 AM, zach smith <zach...@gmail.com> wrote:
I would like to change the color on my font that is being replaced for
a certain a:hover. Is it possible?

--

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.



zach smith

unread,
Dec 17, 2009, 11:18:07 AM12/17/09
to cufón
Hmm doesn't seem to work.

here is the code I'm using:

<script type="text/javascript">
Cufon.replace('.myClass', {
hover: true
});
</script>

located here: www.mibsolutionsllc.com/stokes in the bottom nav

> > cufon+un...@googlegroups.com <cufon%2Bunsu...@googlegroups.com>.

Gareth Evans

unread,
Dec 17, 2009, 10:15:29 PM12/17/09
to cu...@googlegroups.com
Hi Zach
 
Looking at your markup, you need to target the element above the div.myClass (the a).
Cufon only supports hover on anchor tags.
 
This should work for you, assuming of course you have a selector library (e.g. prototype, jquery, sizzle) included for older browsers (that don't have a natively exposed selector engine)
Cufon.replace('div#footer ul li.page_item a', { hover: true });
 
Gareth
To unsubscribe from this group, send email to cufon+un...@googlegroups.com.

Simo Kinnunen

unread,
Dec 20, 2009, 7:52:10 PM12/20/09
to cu...@googlegroups.com
Hi Zach,

Gareth is right. I just wanted to add that inline level elements (<a>)
cannot contain block level elements (<div>) and therefore your HTML is
invalid. Don't worry though, this is a very common mistake. It might
work just fine, but then again it might not. For predictable behavior
you should always use valid HTML.

Simo

Reply all
Reply to author
Forward
0 new messages