tags:

views:

490

answers:

2

I have set up sIFR on a site and it is working correctly. However I need to be able to apply multiple styles based on class.

The functioning code is:

    sIFR.replace(myriadpro, {
  selector: 'h2',
  css: '.sIFR-root { font-size: 20px; color: #008cba; text-transform: capitalize; }',
  wmode: 'transparent'
});

However, I need to be able style h2.white with a different font color. I just need to know how to add another selector.

Thanks in advance for the help.

+1  A: 

The (arguably) simplest way to do this is to make multiple calls to sIFR.replace. So, just call it again with the different selector and styling rules.

However, keep in mind that if you simply need to apply the same settings to just another set of elements, the selector key of the options object can contain a comma-delimited list of selectors, just like a regular CSS file.

jason
Also make sure to do the most specific `sIFR.replace` call first. So replace `h2.special` before `h2`.
Mark Wubben
A: 

Check out this page: http://www.teddy-o-ted.com/tutorials/implementing-sifr-3/

JT