views:

387

answers:

1

I'm using sIFR 3 (beta revision 436).

I have a simple question, but I can't figure out the solution. I want to select an <a>-tag directly by it's class, not by its parent like I'm doing now:

sIFR.replace(din, {
   selector: '.mainmenu'
   ,css: [
     '.sIFR-root { font-size:13px; text-transform:uppercase; cursor:pointer; text-align:center }'
     ,'a { text-decoration: none; color: #FFFFFF; }'
     ,'a:link { color: #FFFFFF; }'
     ,'a:hover { color: #CCCCCC;}'
   ]
   ,transparent: true
  }
);

".mainmenu" is the class of a <span> containing the <a>. But sometimes a can't use this method and need the call the <a>-tag directly. All the examples I found on the internet seems to use the method above.

Can anyone help me how to write my selector?

+1  A: 

You can't replace <a> directly, you must replace a parent element for links to work cross-browser. But of course you use different CSS selectors to get at a parent element.

Mark Wubben