【发布时间】:2012-07-30 10:15:14
【问题描述】:
我在网上搜索并在 stackoverflow 上找到了 exclude an element 的 Cufon 转换的解决方案,因为我的字体 'BlueHighwayDType' 不包含 '€ ' 符号,所以我必须排除这个元素才能在 ie7/8 上看到它。 http://www.matteowebdesigner.com/test/yesimove/
<!--head-->
<!--[if lt IE 9]>
<script type="text/javascript" src="js/cufon-yui.min.js"></script>
<script type="text/javascript" src="js/Blue_Highway_D_Type_400.font.js"></script>
<script type="text/javascript" src="js/mind-ie.js"></script>
<![endif]-->
我要替换的元素是 p,我要排除的元素是 span.small
<!--body-->
<article>
<p>L'unico <strong>Personal Trainer</strong> <br/>
che ti segue ovunque</p>
<p>e ti permette di <strong>condividere</strong>
i tuoi progressi con i tuoi amici.</p>
<p>A soli <strong>9.<span class="small">99 €</span></strong> al mese !</p>
</article>
所以我尝试了我在网上找到的示例,并使用了选择器“:not”,但它不起作用。看这个:
/*mind-ie.js*/
$(document).ready(function() { // Start Functions
Cufon.replace('#main #slogan section article p:not(.small)');
});
我不明白,因为它不起作用,我认为选择器是正确的。
【问题讨论】:
标签: jquery jquery-selectors fonts font-face cufon