views:

87

answers:

1

I have the following in my sifr-config.js file:

sIFR.replace(avenir_book, {
  selector: 'p:first-child',
  css: '.sIFR-root { color: #782221; font-size:22px; }',
  wmode: 'transparent'
});

But it doesn't work. I've verified that the same CSS works by testing it in my normal stylesheet. Does sIFR not understand this pseudo element, or does it need to be called in a special way?

A: 

Assuming you are using sIFR 3, :first-child is not supported as indicated by this page. However, sIFR can be made jQuery compatible, read more here.

Steps to replace parseSelector with jQuery:

1 - Make sure you include the jQuery JavaScript file.

2 - Remove all of the parseSelector code at the bottom of sifr.js

3 - Add the following line:

var parseSelector = $;

meder
Thanks Meder, that's perfect.
Ryan