Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery Audio Play on button click

$('.btn').click(function() {
  var audio = new Audio("sounds/" + $(this).attr('id') + ".mp3");
  audio.play();
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: react native tabbed sticky view 
Javascript :: dm someone by id discord.js 
Javascript :: jest global window object 
Javascript :: javscript generate empty 2d array 
Javascript :: react useeffect not on first render 
Javascript :: animate flash jQuery 
Javascript :: drupal 8 render node programmatically 
Javascript :: js remove all objects from array where value 
Javascript :: show div js 
Javascript :: js to json 
Javascript :: check if function exists javascript 
Javascript :: how to push a file to github 
Javascript :: get day name from date javascript 
Javascript :: give div event listener functional component 
Javascript :: javascript get content between tags 
Javascript :: npm package for sorting in reactjs 
Javascript :: javascript settimeout params 
Javascript :: delete backspace on string js 
Javascript :: mongoose connect to URL of atlas 
Javascript :: react native scrollview sticky header 
Javascript :: redirect to website javascript 
Javascript :: javascript countdown 10 seconds 
Javascript :: browserrouter react 
Javascript :: disemvowel trolls codewars javascript 
Javascript :: ajax call too functions.php 
Javascript :: datatable destroy 
Javascript :: if button is pressed js 
Javascript :: javascript adding delay 
Javascript :: how to print the value of variable in javascript in html 
Javascript :: fetchData from json file 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =