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

Automating UIStoryboard localizing without duplicating .storyboard files

ios xcode localization

So far, I used to manually create a localization file for storyboards texts, writing a line like this one for each UILabel / UIButton.-

Saving activity state on screen Orientation change

android datepicker

A DatePicker dialog is opened and it displays the default date.I then select a desired date and then rotate the screen. I observe that the selected date is replaced by default date. Is there a way to

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.