Javascript library to load audio not working

Im a bit of noob when it comes to coding. still learning as i go

Im trying to add this Javascript library to my website

http://buzz.jaysalvat.com

In their documents it say to add some code to specify the mp3 file

Here is my head Tag

<html>
    <head>
        <title>Through The Glass Eye</title>
        <meta name="viewport" content="width=1120,user-scalable=no" />
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300" rel="stylesheet" type="text/css" />
        <script src="js/jquery-1.9.1.min.js"></script>
        <script src="js/jquery.poptrox-2.1.js"></script>
        <script src="js/config.js"></script>
        <script src="js/skel.min.js"></script>
        <script src="js/buzz.js"></script>
        <script>
            var mySound = new buzz.sound("/Audio/rdn071.mp3");
        </script>

        <noscript>
        <link rel="stylesheet" href="css/skel-noscript.css" />
        <link rel="stylesheet" href="css/style.css" />
        <link rel="stylesheet" href="css/style-desktop.css" />
        <link rel="stylesheet" href="css/style-noscript.css" />
        </noscript>
        <!--[if lte IE 8]><script src="js/html5shiv.js"></script><link rel="stylesheet" href="css/ie8.css" /><![endif]-->

    </head>

The site is loading and i checked with firebug the Jscript is loading...

Am i doing this correctly???? Thanks a lot in advance

Answers


in case you want to make it play right after the page is loaded, use the ready event, your code could be as in this example:

<head>
    <script src="js/jquery-1.9.1.min.js"></script>
    <script src="js/buzz.js"></script>
    <script>
        var mySound = new buzz.sound("/Audio/rdn071.mp3");

        $(document).ready(function(){
            mySound.play();
        });
    </script>
</head>

tested in jquery 1.10.2


Need Your Help

Pythonic Way To Check for A Parameter Type

python class exception-handling parameter-passing

I'm working on a little side project for work and have made some classes and methods. One of the classes represents a shelf in our inventory and another represents each a bin on the shelf. I have a

Performance issues with simple calculations

c++ optimization

EDIT 2: 16% decrease in program computation time! See bottom for calculation