How to disable Cufon on certain elements?

后端 未结 4 755
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-30 10:53

I currently use Cufon accross our site with something similar to Cufon.set(\'fontFamily\', \'DIN Medium\').replace(\'h1\'); Now for a single H1 tag i would like

4条回答
  •  没有蜡笔的小新
    2020-12-30 11:24

    Depending on which selector engine you use, you can:

    • add a class to your exception h1 element
    • you can use the :not selector to only apply cufon to the h1's that don't have the aforementioned class (with jQuery and classname 'clean' it would be something like Cufon.replace('h1:not(.clean)');

提交回复
热议问题