tags:

views:

134

answers:

0

Hi i've been playing around with sifr3 and seems to do an ok job lil bit slow to load but acceptable :). However my problem stands with roll overs/hovers.

I'd like to be able to put an active state for the current page.

This i can do by just putting a style to the child for some reason ;) it turns to the default "a" color. But when i hover over the other links i'd like it to turn to the default color of a:link.

I've tried using javascript to change the css in the dom with according sifr3 selectors. But it seems that i would have to issue reload everytime. So i'm sort of stuck.

Here's my current code

sIFR.replace(myriad, {
   wmode: 'transparent',
  selector: ' .myriad2',
  css: {
        '.sIFR-root': { 'color': '#ffffff', 'background': 'transparent', 'letter-spacing': '0', 'leading': '-10', 'font-size' : '18' },
'a': { 'text-decoration': 'none', 'color': '#5DB9FA'  },
'a:link': { 'color': '#ffffff' },
'a:hover': { 'color': '#5DB9FA' }
      },
     forceSingleLine: true,
    filters: {
    DropShadow: {
    knockout: false,
    distance: 2,
    color: '#000000',
    alpha: .75,
    angle: 120
  },
BevelFilter: {
distance: 8,
angle: 90,
highlightColor: 0x000000,
highlightAlpha: 1,
blurX: 5,
blurY: 5,
strength: 1,
quality: 3,
type: 'inner',
knockout: false
}
}
});



   <!--nav-->
      <ul >
        <li  class="myriad2"><a class="current" href="#"><span >Home</span></a></li>
        <li  class="myriad2"><a href="#"><span>What we do</span></a></li>
        <li  class="myriad2"><a href="#"><span >Who we are</span></a></li>
        <li  class="myriad2"><a href="#"><span>Contact Us</span></a></li>
      </ul>
      <!--end nav-->

I know not optimal and plan to move the css selector to #someId li

but i'm still playing around.

what would be ideal would be to add in the css

css:  {
'.sIFR-root': { 'color': '#ffffff', 'background': 'transparent', 'letter-spacing': '0', 'leading': '-10', 'font-size' : '18' },
'.sIFR-root:hover a.active { 'color' : '#ffffff' },
'a': { 'text-decoration': 'none', 'color': '#5DB9FA'  },
'.sIFR-root:hover a.active:hover { 'color' : '#5DB9FA' },
'a.active { 'color' : '#5DB9FA' },
'a:link': { 'color': '#ffffff' },
'a:hover': { 'color': '#5DB9FA' }

but that doesnt seem to work too good :/,

i'd love to see an example or some hints on how anyone has achieved it.