GithubHelp home page GithubHelp logo

Comments (9)

jonbro avatar jonbro commented on August 17, 2024

I was having a similar issue, I fixed it by adding the following code:

$("#sidebar ul#udm li a").hover(function(){
}, function(){
    Cufon.refresh();
});

the original selector that was failing was: #sidebar ul#udm > li > a

this requires jquery however.

from cufon.

kirbysayshi avatar kirbysayshi commented on August 17, 2024

Is there a way to fix this and call Cufon.refresh() on only the single element that needs it, even if that element's selector was not a part of the intial Cufon.replace() call?

from cufon.

znewsome avatar znewsome commented on August 17, 2024

I'm having the same problem and can't seem to come up with a fix. Where exactly do I add the code jonbro gave?

from cufon.

jonbro avatar jonbro commented on August 17, 2024

inside your $(document).ready(function(){
});

from cufon.

znewsome avatar znewsome commented on August 17, 2024

appreciate that, but are we talking in the jquery.js file or the cufon.js file? I've done searches Sorry for my ignorance. I am designer that's in deeper than he wishes and needs to close out a project :(

from cufon.

jonbro avatar jonbro commented on August 17, 2024

it doesn't matter which file it goes in, so long as it is inside of the document.ready. It should probably go right next to where you have your initial cufon replace.

from cufon.

znewsome avatar znewsome commented on August 17, 2024

Jonbro,

I'm stuck on this one. I've tried adding your code, but can't seem to get it to work. If you have a minute, do you mind looking at the horizontal menu at http://www.compassmentalhealth.com/index.php/ and seeing if something pops out at you for a fix?

Thanks in advance for your help,
Zack Newsome
MethodLab

from cufon.

jonbro avatar jonbro commented on August 17, 2024

sorry man, your code that I am looking at is far more complex than the issue that I was dealing with.

from cufon.

iamike avatar iamike commented on August 17, 2024

when the page load, js load. cufon start rendering the font. I clone two style and cufon. so all the each item I have two state.
one for hover state, initially hiding( css display:none ). another is for no hover state(normal state), initially showing( CSS display:inline).

//add cufon style for primary nav, cufon active status for item 
$('DIV#topNavigationContainer UL LI SPAN').each(function(){

    $(this).clone().addClass('active').insertAfter(this);
    $(this).addClass('no-active');



});
Cufon.replace('DIV#topNavigationContainer UL LI SPAN A', { fontFamily:'Sabon-b'}) // primary nav

//hover status
$('DIV#topNavigationContainer UL LI:not("LI.Active")').hover(function(){
    $(this).find('SPAN.no-active').hide();
    $(this).find('SPAN.active').show();
},function(){
    $(this).find('SPAN.no-active').show();
    $(this).find('SPAN.active').hide();

})

and then using css to show/hide dropdown according to the first level LI's class has .active or .no-active.

correct me, if you have better idea on this. I know this is not officially solution.

from cufon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.