tonyd
06-13-2012, 03:25 PM
EDIT: PROBLEM SOLVED.
Hi all. I've been visiting the forums here for a while now, but this is my first post. I wasn't sure whether to post this here, or in the JS forum, so moderators, please feel free to move this if it's in the wrong place.
I'm working on a site (single page layout), and I'm trying to create a single-line horizontal menu, with no sub-items. I'd like to make each anchor link play a sound AND swap images onClick. Is this possible to do using pure CSS? I'd prefer not to use JS, but am willing if that is the only/best way.
I've made an unsuccessful attempt using JS, but I don't know it very well, and I am stumped. If anyone wants to have a look at that attempt, there is a jsFiddle here: http://jsfiddle.net/tBpMV/2/
The sound and image swap work fine, but clicking the links does not take you anywhere. There is a small JS script on the bottom of the html that controls the image swap. If I delete that code, the links begin working, but then there's no image swap. I've tried everything I can think of to get it working, but no joy. :(
So anyway, I'm hoping there's a way to accomplish this without the JS. I'd sure appreciate any advice/input.
Thanks in advance!
Hi all. I've been visiting the forums here for a while now, but this is my first post. I wasn't sure whether to post this here, or in the JS forum, so moderators, please feel free to move this if it's in the wrong place.
I'm working on a site (single page layout), and I'm trying to create a single-line horizontal menu, with no sub-items. I'd like to make each anchor link play a sound AND swap images onClick. Is this possible to do using pure CSS? I'd prefer not to use JS, but am willing if that is the only/best way.
I've made an unsuccessful attempt using JS, but I don't know it very well, and I am stumped. If anyone wants to have a look at that attempt, there is a jsFiddle here: http://jsfiddle.net/tBpMV/2/
The sound and image swap work fine, but clicking the links does not take you anywhere. There is a small JS script on the bottom of the html that controls the image swap. If I delete that code, the links begin working, but then there's no image swap. I've tried everything I can think of to get it working, but no joy. :(
So anyway, I'm hoping there's a way to accomplish this without the JS. I'd sure appreciate any advice/input.
Thanks in advance!