admin管理员组文章数量:1332896
I need to refresh Cufon fonts after getting AJAX data. Unfortunately simple Cufon.refresh() don`t work in IE8. Debugger says, tah the line 1191
sStyle.width = roundedShapeWidth;
has Invalid argument.
How to fix it?
I need to refresh Cufon fonts after getting AJAX data. Unfortunately simple Cufon.refresh() don`t work in IE8. Debugger says, tah the line 1191
sStyle.width = roundedShapeWidth;
has Invalid argument.
How to fix it?
Share Improve this question asked Feb 17, 2010 at 8:52 Krzysztof RomanowskiKrzysztof Romanowski 2,1942 gold badges20 silver badges30 bronze badges 02 Answers
Reset to default 5I had the same problem. Not only in Cufon.Refresh but also when Cufon.Now occured. And not only in IE8, but in IE7, IE6 and even in IE9PP. I noticed that I use this code for replecament:
Cufon.replace('h1',{hover: true})('h2',{hover: true})('h3',{hover: true})('cite',{hover: true})('.cufon',{hover: true});
The ('.cufon',{hover: true}); part was the one which generated the error. I spent two days to find out, how it could raise an error...
I opened CSS, looked for .cufon sytling. There was no .cufon in CSS. And cufon didn't inherit styles in IE series, insted an error occured.
So I added this to my CSS:
.cufon { }
and error went away.
(Using Cufon 1.09)
I had the same problem and I just reused Cufon.replace instead:
Cufon.replace('h1',{fontFamily: 'StackOverflow'});
Only inconvenient I see is that if you want to refresh all contents, you need to re-list them all:
Cufon.replace('h1, h2',{fontFamily: 'StackOverflow'});
Cufon.replace('h3', { fontFamily: 'StackOverflow Light'});
本文标签: javascriptCufonrefresh() dont work in IE8Stack Overflow
版权声明:本文标题:javascript - Cufon.refresh() don`t work in IE8 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742309579a2450596.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论