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 901585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:34:43+00:00 2026-05-15T15:34:43+00:00

I have this code: $(‘#typer’).keypress(function(e){ var code = (e.keyCode ? e.keyCode : e.which); if

  • 0

I have this code:

$('#typer').keypress(function(e){

            var code = (e.keyCode ? e.keyCode : e.which);

            if (code == '13') {
                $.sound.play("cr.wav",{timeout:1000}); 
            } else if (code == '8') {
                $.sound.play("del.wav",{timeout:1000});
            } else if (code == '27') {
                $.sound.play("asswipe.wav",{timeout:1000});
            } else {
                $.sound.play("key.wav",{timeout:1000});
            }
        });

Now, for some reason – I can only type one character in this box. The sound plays once and then nothing more.

This works fine in IE… Just FireFox…

Plugin link: http://code.google.com/p/jqueryjs/source/browse/trunk/plugins/sound/jquery.sound.js?r=5750

Has ANYONE ever used this plugin….?

  • 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-15T15:34:43+00:00Added an answer on May 15, 2026 at 3:34 pm

    First, e.which is a number, not a string, so you should lose the single quotes: use code == 13, not code == '13'. You might be better served by a switch statement (though that’s just a matter of preference).

    Second, I don’t think the problem is with the plugin. Without using the plugin, this has the same problem:

    $('#typer').keypress(function(e) {
        var snd = $('<embed hidden="true" loop="false" src="key.wav" autostart="true" height="0" />');
        snd.appendTo("body");
        setTimeout(function() { snd.remove(); }, 1000);
    });
    

    It seems that FF and Chrome do not deal well with having <embed> tags added to them dynamically. You may want to look for a different plugin, one that doesn’t use the tag. I’m not a fan of flash, but there are probably some plugins out there that use it, and that work well.

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

Sidebar

Related Questions

i have this code: function MyClient() { var personPath = M255.968,166.154c34.206,0,61.936-27.727,61.936-61.934c0-34.208-27.729-61.936-61.936-61.936s-61.936,27.728-61.936,61.936 C194.032,138.428,221.762,166.154,255.968,166.154z M339.435,194.188c-13.082-13.088-28.625-20.924-84.83-20.924 c-56.214,0-71.38,8.505-83.796,20.924c-12.422,12.416-8.23,144.883-8.23,144.883l27.485-65.304l17.28,194.554l49.856-99.57
I have this code: ie1.link(:text, /Exception:/) It is producing an error message which I
I have this code which export data from GridView to csv. It works with
I have this code which getting html code of page and than replace all
I have this code : for (var i = 0; i < result.length; i++)
I have this code: public function getRecurringEventsByGrouped($grouped){ $query = SELECT * FROM `event` AS
Have this code: var gradient = ctx.createLinearGradient(0,0, 20, 0); gradient.addColorStop(0.8, rgb(250,250,0)); gradient.addColorStop(1, rgb(150,150,0)); ctx.fillStyle
I have this code which calculates the sum of "letter numbers" in a string,
I have this code: $('*').mouseover(function() { $('#log').text($('*').id); }); When you mouse over any element
I have this code: $.post(php/tagNotifUnsub.php, $(#tagNotifUnsub).serialize(), function(){ $('#tagSubDiv').load('tags.php #tagSubDiv', function(){$( button, input:submit, input:button, a#jql,

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.