Results 1 to 2 of 2

Thread: Menu click to reveal help

Hybrid View

  1. #1
    Join Date
    Dec 2013

    Menu click to reveal help

    Hi there, I have a really simple task that I need help on...

    I want to have 4 images side by side.. they are all buttons.. when i click one of them it changes colour, and reveals text underneath.. If i click another one of the buttons the first button changes back to the original colour and the new button i have clicked changes colour and the text underneath is replaced with new text... seems simple right? Any tutorials or examples of what I'm looking for would be appreciated.

    Thanks in advance.

  2. #2
    Join Date
    Mar 2012
    This can be done more elegantly in JavaScript or PHP, but the way to do this in HTML is to set up five pages:

    pg0.html - No buttons highlighted.
    pg1.html - 1st button highlighted, text displayed.
    pg2.html - 2nd button highlighted, text displayed.
    pg3.html - 3rd button highlighted, text displayed.
    pg4.html - 4th button highlighted, text displayed.

    Each page has the four buttons. Pressing button 1 (on any page) displays pg1.html which has the 1st button highlighted and the relevant text displayed.
    And so on...

    It is repetitive having to produce five very similar pages, but that can be minimised by creating one page in full, then copying and amending to create the other pages.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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