Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2005
    Thanked 0 Times in 0 Posts

    Navigation conundrum

    Hi all,

    I have a problem that I do not know how to approach. Let's say I have 3 image sourced buttons serving as a nav bar at the top of my page that control an iframe below. When I hover over the images I use a change source script to alter their appearance - easy enough. But what I want to do is have the button keep the hovered state when it is clicked. Using the onClick function I can do this but when I MouseOff of the button it goes back to the non-hovered state because of the original hover on/off code. My question is "Is there a way around this? - maybe with an if statement or something." Any help would be great. Thanks.


  2. #2
    New Coder
    Join Date
    Apr 2005
    Burnaby, BC, Canada
    Thanked 0 Times in 0 Posts
    If you post some code/link, that would be helpful.

    What I would do is save some sort of unique id for the image when it is clicked. And in your mouseout code, only change it if the unique id is not the one clicked down.
    'Programming is the only artform that fights back!'


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts