Comments (9)
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.
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.
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.
inside your $(document).ready(function(){
});
from cufon.
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.
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.
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.
sorry man, your code that I am looking at is far more complex than the issue that I was dealing with.
from cufon.
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)
- Does cufon supports Devnagari script? HOT 3
- Margin / Padding / Line-height problems in IE8
- Capital "A" isn't rendering HOT 5
- Problem loading font on iOS devices where CSS media = print included
- Hover { hover: 'true' } doesn't work within HTML5 <nav> element
- Blurry text windows 8 mobile
- Animate Colour of Cufon Text
- Object required line 7 character 1638 @version 1.09i
- Cufon font SwitzerlandCondensed: bold is shifted up compared to normal
- Cufon for retina display
- Vertical text support
- Cufon vanishes my header after rendering on Safari
- Cufon make my website disappear in firefox
- Cufon google translate problem
- Cufon Not Working? HOT 5
- Cufon different line-hight IOS vs PC
- If descent is zero, cufon returns empty string instead of zero for descent. HOT 1
- FontForge version on Cufon website HOT 4
- Please bring back development HOT 1
- Cufon not working properly in latest Google Chrome HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cufon.