Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var nameArray = [
- "I'm gunna give you a fun problem",
- "I think that's a stupid number",
- "Jesus God",
- "Hold on, let me finish",
- "No, I have no faith in aliens",
- "It's also possible you could walk through the wall",
- "By the way, the heart is an incredible organ",
- "There's very little activity out here",
- "Wow, I wanna hit that",
- "Idiot",
- "There's no more Mexicans here, how in the hell am I gunna keep my yard?",
- "Political Bullshit",
- "This is Wacko",
- ];
- var baseurl = "http://dl.dropbox.com/u/109430408/bob/";
- var container = $('<div />');
- var clips = $('<div />');
- $(document).ready(function() {
- $(document.body).append(container);
- $(document.body).append(clips);
- nameArray.forEach(function(label,i) {
- var snd = $('<audio id="sound'+i+'" src="'+baseurl+i+'.ogg"></audio>');
- clips.append(snd);
- var btn = $('<button value="'+label+'">'+label+'</button>');
- container.append(btn);
- btn.click(function() {
- snd.play();
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement