I have written a small web application but am missing some cool functionality. I want to play a sound when the user clicks the link, but after playing the sound continues to navigate to the URL the link points to.
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
While the pursuit of coolness is a worthy ideal, I would strongly recommend against playing a sound when a user clicks a link (or at any time!). As both a user and a web developer this would startle me right to the back button. Only several minutes later would I be witty enough to think that I just time traveled to the mid 1990’s
EDIT
unless you’re going for something retro, like this: (which i highly suspect you aren’t)
http://www2.warnerbros.com/spacejam/movie/jam.htm
EDIT II
Hmm… well I guess a being a game changes things a little. I would recommend binding the click event with jquery to append a sound file to the dom, something like this: