伙计,我只是不明白。我有四组配对链接,通过将鼠标悬停在另一组上。我让它在 jQuery 中工作,但是当我添加 Cufon 时它不是骰子。这是JQ脚本:
<script type="text/javascript">
jQuery(document).ready(function() {
var doubleHighlight = function(element1, element2, class) {
element1.hover(
function() {
element2.addClass(class);
},
function() {
element2.removeClass(class);
}
);
element2.hover(
function() {
element1.addClass(class);
},
function() {
element1.removeClass(class);
}
);
};
doubleHighlight(jQuery("#abouttop"), jQuery("#aboutbottom"), "highlight_about");
doubleHighlight(jQuery("#worktop"), jQuery("#workbottom"), "highlight_work");
doubleHighlight(jQuery("#blogtop"), jQuery("#blogbottom"), "highlight_blog");
doubleHighlight(jQuery("#contacttop"), jQuery("#contactbottom"), "highlight_contact");
});
</script>
这是 Cufon 的部分:
<script src="cufon-yui.js" type="text/javascript"></script>
<script src="gothamxlight_300-gothamxlight_300.font.js" type="text/javascript"> </script>
<script src="gothamlight_300-gothamlight_500.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('#type', { fontFamily: 'gothamxlight', hover: true});
Cufon.replace('#smalltype', { fontFamily: 'gothamlight', hover: true});
Cufon.replace('#nav', { fontFamily: 'gothamlight', hover: true});
</script>
有任何想法吗?也许Cufon如何呈现文本?是否需要刷新?我在这里抓住稻草。