Need some help with onClick and an if/else issue...

Posted by Adam on Stack Overflow See other posts from Stack Overflow or by Adam
Published on 2010-03-28T09:32:16Z Indexed on 2010/03/28 9:43 UTC
Read the original article Hit count: 293

Filed under:
|
|
|
|

I have a menu with seven items. If you click the first item, div one shows. If you click any other item (2 through 7) div two shows. That's what I'm looking to do.

I'm new at all this but am pretty sure it's an if/else function, such that if I click on <a id="1">, show the first div, else show the second div. I suppose I can do a hide/show to get back to the first div.

I'm going to keep poking around, but if I can't find it, any help is surely appreciated.

© Stack Overflow or respective owner

Related posts about onclick

Related posts about ifelse