I'm working on a rather complex site that includes a tab UI on some of
the pages. When toggling between the tabs, the active state on the
Cufon text doesn't refresh when the tab is no longer active. I've
replicated the problem in a very simplified example here:
http://a.parsons.edu/~bekek461/cufonExample/
When clicking between the tabs you'll find that the red 'active' state
on the tabs doesn't change back to black until after you hover over
those tabs again.
Callling Cufon.refresh('a') as a simple selector will solve the
problem. However, that kind of selector is way too general and will
cause a lot of other anchor tag elements on the page to refresh as
well -- which makes everything slow. I want to be able to target ONLY
the elements in the tabs to refresh...but trying selectors like
Cufon.refresh('#tabHolder li a') or even doing the same using a JQuery
selector or a basic JS selection (document.getElementById....) doesn't
work.
I've even tried more complex things like manipulating the mouseover,
mouseout events with callbacks, but that wasn't successful either.
Any help at all would really be appreciated...It's little things like
this that drive me nuts!
Thanks!
then when you call Cufon.refresh you can call it like a zis: Cufon.refresh('#nav a') then it will only refresh the a elements under the id nav
--
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.
| Looks like some ambiguous event programming. Is your mouse out making the 'old' tab live again? Charles http://www.irunmywebsite.com/ --- On Mon, 3/1/10, Katrina <kmbe...@gmail.com> wrote: |
|
|
I'm glad it was something simple to fix, but feel that this shouldn't
be how Cufon works. We should be able to target specific selectors on
the fly if those elements in general had been replaced initially.
Turns out, an issue for this has already been submitted by someone
else: http://github.com/sorccu/cufon/issues#issue/46
Thanks again for the help!
On Mar 2, 2:35 am, Drake Wayne <cartman.way...@gmail.com> wrote:
> If you just want the elements on the tab to refresh why not do something
> like this.
> When replacing your a tag instead of doing this " Cufon.replace('a', {
> hover: true}); " try to replace only those a elements on your navigation.
> like a zis : Cufon.replace('#nav a', {hover: true}); then when you call
> Cufon.refresh you can call it like a zis: Cufon.refresh('#nav a') then it
> will only refresh the a elements under the id nav
> provided that the ul element has the id set to nav.
>
>
>
> On Tue, Mar 2, 2010 at 1:16 AM, Katrina <kmbeke...@gmail.com> wrote:
> > Hi all,
>
> > I'm working on a rather complex site that includes a tab UI on some of
> > the pages. When toggling between the tabs, the active state on the
> > Cufon text doesn't refresh when the tab is no longer active. I've
> > replicated the problem in a very simplified example here:
>
> >http://a.parsons.edu/~bekek461/cufonExample/<http://a.parsons.edu/%7Ebekek461/cufonExample/>
>
> > When clicking between the tabs you'll find that the red 'active' state
> > on the tabs doesn't change back to black until after you hover over
> > those tabs again.
>
> > Callling Cufon.refresh('a') as a simple selector will solve the
> > problem. However, that kind of selector is way too general and will
> > cause a lot of other anchor tag elements on the page to refresh as
> > well -- which makes everything slow. I want to be able to target ONLY
> > the elements in the tabs to refresh...but trying selectors like
> > Cufon.refresh('#tabHolder li a') or even doing the same using a JQuery
> > selector or a basic JS selection (document.getElementById....) doesn't
> > work.
>
> > I've even tried more complex things like manipulating the mouseover,
> > mouseout events with callbacks, but that wasn't successful either.
>
> > Any help at all would really be appreciated...It's little things like
> > this that drive me nuts!
>
> > Thanks!
>
> > --
> > 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 <cufon%2Bunsu...@googlegroups.com>.