Another question on show/hide divs |
Another question on show/hide divs |
bigginge |
Mar 22 2012, 09:51 AM
Post
#1
|
Member Group: Members Posts: 58 Joined: 23-January 12 Member No.: 16,315 |
I solved an earlier question I had on this subject but is there anyway I can have the first div Here (2011) showing when the page loads?
|
pandy |
Mar 22 2012, 11:53 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I solved an earlier question I had on this subject but is there anyway I can have the first div Here (2011) showing when the page loads? Well, don't hide it to start with I guess. The DW script looks pretty hairy. And it's overkill. There's no need to show and hide when all you want to do is to switch one image to another. Also, the value of an ID must begin with a letter. Some browsers may ignore you all numeric IDs. http://htmlhelp.com/reference/html40/attrs.html#id |
bigginge |
Mar 22 2012, 01:57 PM
Post
#3
|
Member Group: Members Posts: 58 Joined: 23-January 12 Member No.: 16,315 |
Thank you for the advice on the IDs, I will sort that out.
I found a tut online which explained how to achieve what I did. Could you advise how to do it differently, or point me to a tutorial to explain it? I can see how show hide in Dreamweaver would do it, but I need the images to be in the same place, on top of each other as it were. |
pandy |
Mar 22 2012, 04:02 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
If you place the first image where you want it you can then use JavaScript to change the src of the IMG tag when the links are clicked instead of hiding and showing. I don't know if one method is more effective than the other, but it seems easier this way since it's only equally sized images involved.
|
Lo-Fi Version | Time is now: 24th April 2024 - 06:03 AM |