Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8366647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:57:59+00:00 2026-06-09T12:57:59+00:00

Please see working code here: http://jsfiddle.net/hrnDG/6/ I would like to modify this code so

  • 0

Please see working code here: http://jsfiddle.net/hrnDG/6/

I would like to modify this code so all possible answers become links to .mp3 files. When the user clicks any of these links, the audio file is played. The user can then select their answer and press submit.

How can I go about doing this? Is there something simple I can apply to my code to get this to work? I’m worried that adding something might disable the right and wrong CSS classes.

Please know: If anyone thinks there is a more efficient/easier way than turning the link into a playable mp3 link, I’m all ears.

Many thanks!

My code:

<form>
<table>
<tr class="q1">                       
    <td>What sounds like a rabbit?</td>
    <td>
        <input class="radiostyle wrong" type="radio" name="answers" value="Java" id="answers_1_Java" />
        <label for="answers_1_Java">A</label></td>
    <td>
        <input class="radiostyle right" type="radio" name="answers" value="JavaScript" id="answers_1_JavaScript" />
        <label for="answers_1_JavaScript">B</label></td>
    <td>
        <input class="radiostyle wrong" type="radio" name="answers" value="Ruby" id="answers_1_Ruby" />
        <label for="answers_1_Ruby">C</label></td>
    <td>
        <input class="radiostyle wrong" type="radio" name="answers" value="C#" id="answers_1_C#" />
        <label for="answers_1_C#">D</label></td>
    <td><input class="submit submit-1" type="submit" value="Submit" /></td>
    <td></td></tr></table></form>​

JS

$('.submit').click(function() {
$(this).closest('tr')
    .find('[name="answers"]')
        .removeClass('checked')
    .filter(':checked')
        .addClass('checked');
return false;
});​
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:58:00+00:00Added an answer on June 9, 2026 at 12:58 pm

    If you can assume that your users have an HTML5 enabled browser, you can add a hidden <audio> element to the page and play it from your script.

    <audio hidden="hidden" id="sound">  
      <source src="sound.ogg" type="audio/ogg" />
      <source src="sound.mp3" type="audio/mpeg" />
    </audio> 
    

    If the <audio> is supported within their browser, then use JavaScript to start the player by the following code:

    document.getElementById("sound").play();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please see demo here: http://jsfiddle.net/mA6qm/1/ (expand console) Why aren't events being sent or received
hello friends i have tryied folowing code as u can see here http://jsfiddle.net/QCdz4/ i
Please see this IBM site - http://www.ibm.com/us/en/ If you see the site banners, there
I have an SVG slider that I've been working on ... please see it
Please see here , at the end of the post, the 70px author image
Please see below code: thrust::device_vector<int>::iterator whereToBegin = copyListOfNgramCounteachdoc.begin(); end = thrust::unique_by_key(end.first, end.first + numUniqueNgrams,end.second);
Please see this example: if (strlen($_SESSION['userDetails']['THISNAME']) == 0) { $_SESSION['userDetails'][''.$THISNAME.'Error'] = autofocus; include $docRoot/html/forms/reg/user_info.html.php;
Please see the code snippet below : #include <iostream> using namespace std; int main()
Please see the form HTML code below <form method=post action=register> <div class=email> Email <input
I'm trying to add a control(Label) inside of a panel. Please see the code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.