Fast javascript play sound code
In order to play a sound assets with Javascript you just need these snippet:
var sound = new Audio("my_sound.mp3"); // buffers automatically when created
$('#button').click(function(){
sound.play();
});
Another Web Development Blog
In order to play a sound assets with Javascript you just need these snippet:
var sound = new Audio("my_sound.mp3"); // buffers automatically when created
$('#button').click(function(){
sound.play();
});
Hi all,
Today I encountered a strange issue, after opening the on screen keyboard, filling a form and sending it with the keyboard (via javascript which involves no page reloads), the body kept the size of the page plus the size of the keyboard, totally unexpected.
I found a nice hack to avoid the issue and since it works flawlessy it’s worth an article: