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

  • Home
  • SEARCH
  • 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 962939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:35:33+00:00 2026-05-16T01:35:33+00:00

I’m trying to use JQTouch to make a basic mobile site to play a

  • 0

I’m trying to use JQTouch to make a basic mobile site to play a list of audio files. I’m trying to make a simple playlist of tracks to be used in an art exhibit here at school. Sort of like those walking tours you may have seen. When I link to an mp3 file in an unordered list the browser doesn’t open the file and start playing it. It simply throws up trash text.

This happens both in a regular web browser as well as my iPhone and Android phones. If I specify the link destination as _blank it will work but opens the file in another window which has to be closed to go back to the mobile site. I would prefer for a user to simply click on the link and have the phone start playing the audio.

I tried working with the audio tags for HTML5 but had trouble making them work. The player would not show or did something similar to the problem mentioned above.

What’s strange is that after clicking on the link the browser shows me that the link is #undefined.

To be fair I’m not all that great with Javascript so it might be something fairly obvious but so far it eludes me. Thanks for the help.

You can see my mockup at http://trinity.edu/rchapman/iphone/

  • 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-05-16T01:35:34+00:00Added an answer on May 16, 2026 at 1:35 am

    You can’t link directly to an MP3 file in HTML and have it play… You are going to have to do some javascript here:

    In your script section:

    change

    <script type="text/javascript" charset="utf-8">
        $.jQTouch({
            icon: 'tower_logo.png',
            statusBar: 'black'
        });
    </script>
    

    to

    <script type="text/javascript" charset="utf-8">
        $.jQTouch({
            icon: 'tower_logo.png',
            statusBar: 'black'
        });
                $(document).ready(function () {
                        var audio = $('#audio');
                        $('#audio1').tap(function() { audio.attr('src', 'audio1.mp3')[0].play()});
                        $('#audio2').tap(function () {audio.attr('src', 'audio2.mp3')[0].play()});
                });
    </script>
    

    change

    <ul class="edgetoedge">
        <li><a href="audio1.mp3">Item 1</a></li>
        <li><a href="audio2.mp3">Item 2</a></li>
    </ul>
    

    to:

    <audio id="audio"></audio>
    
    <a href="#" class="whiteButton" id="audio1">Item 1</a>
    <a href="#" class="whiteButton" id="audio2">Item 2</a> 
    

    See the audio tag, and html5 rocks for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.