views:

61

answers:

1

Hello everybody,

I try to manipulate the sifr output. I want to add some kind of bullet in front of it (»). I found the method "modifyContentString" at the sifr 3 wiki. But I cannot get the contents. All I receive is an [object Window]. What went wrong?

sIFR.replace(myFont, {
    selector: '#sidebar li',
    modifyContentString: function test() { return content; },
    css: [
        '.sIFR-root {font-size: 10px; text-transform: uppercase; }',
        'a { text-decoration: none; }',
        'a:link { color: #333333; }',
        'a:hover { color: #9d9ea1; text-decoration: underline }'
    ]
});
+1  A: 

The sIFR documentation states that modifyContentString takes in a callback which takes two parameters, content, and selector. your callback accepts no arguments. you just reference a random variable.

Try the following:

sIFR.replace(myFont, {
 selector: '#sidebar li',
 modifyContentString: function test(content, selector) { return content; },
 css: [
  '.sIFR-root {font-size: 10px; text-transform: uppercase; }',
  'a { text-decoration: none; }',
  'a:link { color: #333333; }',
  'a:hover { color: #9d9ea1; text-decoration: underline }'
 ]
});

Cheers!

coderjoe
That was it! Thank you very much.