I've got 3 divs on my site and each one of them is a page to display like a photoslide. Please see functions and code here: http://jsfiddle.net/jasper/EXfnN/29/
Now I need to add some button noise on the second page, for example there should be a click noise everytime when the ABC/National/Other link is clicked. How can I add a click noise to the buttons?
A proper Firefox addon would work, as this site is for a kiosk not for public. However I tried Firefox Noise Addon, but it is only working when a link is linking to a different page, but not when the link is on the same page like my situation.
Is there any way I can add a button noise to each button clicked on the second page? If so how can I do it? Any code/examples/tutorials would be great help.
Thanks in advance.
Edit: Thanks for all your reply. I'm half way there with your help. At the moment there is an email submit function as well slide the page to the next when a button is clicked.
Is it possible for someone to mix those useful code below with my function here please? A bit lost with one click function but two events (sound and submit an email) Thanks!
Here is the additional email submit js.
function abcSubmit() {
$.ajax({
type: "POST",
url: "email.php",
data: "abc=abc",
});
}
function nationalSubmit() {
$.ajax({
type: "POST",
url: "email.php",
data: "national=national",
});
}
function otherSubmit() {
$.ajax({
type: "POST",
url: "email.php",
data: "other=other"
});
}
and email.php is like
if(isset($_POST['abc']))
{
$to = 'abc@site.com';
$subject = 'Entrance notice';
$message = 'Hello ABC.';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}