#1
  1. No Profile Picture
    http://stealthwd.ca
    Devshed Novice (500 - 999 posts)

    Join Date
    Dec 2005
    Posts
    706
    Rep Power
    203

    Fake active and hover states


    Hey everyone. At the company I work for I've developed a CMS and framework that runs the cms. One of the features I've added is I can automatically wrap a div in wrapper divs to give it a shadow, glow, curved corners etc etc etc. It's very handy. I started to expand on this functionality so that I can do the same the same with with different states, to make pseudo buttons out of divs.

    I won't get into too much detail on a technical side, but what I need is to find away to change the state of an element from javascript... so for example if I hover over a parent div, i change specified children of that div so they user the .myCSSClass:hover instead of .myCSSClass

    If I didn't explain this well enough or you have any questions please ask. Hopefully someone will know how to do this off the top of their head though.

    Please and thanks.
  2. #2
  3. No Profile Picture
    http://stealthwd.ca
    Devshed Novice (500 - 999 posts)

    Join Date
    Dec 2005
    Posts
    706
    Rep Power
    203
    As usual I over complicated things... there was a pure CSS way to do this...

    .standardButton:hover .standardButton-top{
    background:url(/images/wrapper-styles/standardButton/topHover.png);
    }

    Comments on this post

    • Winters agrees

IMN logo majestic logo threadwatch logo seochat tools logo