Results 1 to 5 of 5

Thread: Difficult CSS/Javascript Navigation Question

  1. #1
    Join Date
    Aug 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Difficult CSS/Javascript Navigation Question

    I am trying to make simple links stay highlighted when clicked on until another link is selected. The 4 columns below the image area is the links/navigation I am referring to.

    Also, at the bottom right hand corner of the image you will see Next and Previous links and I need these to scroll through the links that correspond to each image.

    I am not sure why this is posing to be so difficult but I have posted this same question to 5 different forums out there and no-one seems to know how. The URL is:
    http://manhattanwest.com/media-center/video-images.php

    Is there anyone here that can help?

    Thanks a ton!!

  2. #2
    Join Date
    May 2007
    Location
    Viet Nam
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi i'm not a coder so i don't really know wat u mean for some phrases, but this:

    simple links stay highlighted when clicked ...
    i also think it's simple which you use:

    Code:
    a:active {
    color: #ff0000;
    }
    or set the background and sth etc. if you want. The :active value means on clicked. If the link is linked to other page, i think it will not works (becoz it's reloaded) but if you use it on a ajax box, it will work i think.

    Hope you can use it.
    Hf

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Spiritvn View Post
    The :active value means on clicked.
    To be precise (and a little redundant), the :active pseudo-class means "whilst active". The definition of active isn't defined in definite terms, but it's generally taking to mean whilst holding a button. So with a mouse, for instance, a link will be active in the time between the button press and the button release, but at no other moment.
    Mike

  4. #4
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    I'm confused thia sounds like javascript is needed or something

  5. #5
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    I'm going to use jquery for this because I absolutely love it...Also, please upload jquery to your own site if you use this.
    Code:
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
    <script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery('#vidLinks a,#vidLinks2 a,#vidlinks3 a,#vidLinks4 a').bind('click',function(){
    jQuery('a.currently').removeClass('currently');
    jQuery(this).addClass('currently');
    })
    }
    );
    </script>
    <style type="text/css">
    a.currently{
    background-color: gray;
    }
    </style>
    Oh, and I didn't test this.

Bookmarks

Posting Permissions

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