SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2005
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post image change depend on url

    Hello ppl! Long time no see...

    I got a task to run, but I can't figure it up cause of my BIT knowliege of JS

    Now whats the task...

    I got a navigation menu and I want it to change image when I go to "The next menu section" I want the js to change a specific image by different URL...

    It's something similar with sitepoint nav menu... Look at the top! See the "Home - Articles - Books - etc...." when you press, lets say the "Books" section the word "Books" getting highlighed... thats what I want but with image change... I could be done by just changing the class...

    The site will be dynamic so the urls will be something like host.com?go=books

    If someone could help I would be very very happy... or gimme some clues...

    I guess it could be done by "Switch" or "if | else"

    Thanks in advance :

  2. #2
    SitePoint Member
    Join Date
    May 2005
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok! I solve the problem

    I guest there is almost the same way to do that with JavaScript...

    But I made it with php... As I understood later after posting that, that is the way to do it....

    In case this ever be needed to someone

    <?php if ($REQUEST_URI == '/?show=support' ) { echo 'class="active_contact"'; } ?>


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
  •