25.04.2016, 13:11
(25.04.2016, 11:47)Erwin van der Zwart Wrote: Hi,
Put this in your custom Javascript and upload a audiofile called 'click.mp3' into your image -> backgrounds tab:
Only for / available in new upcomming firmware version
Code:// Closing current script section to add elements
</script>
<audio id="LM_Audio" style="display: none;"></audio>
<script type="text/javascript"> // Starting new script section after adding elements
$(function() {
var LM_snd = document.getElementById("LM_Audio");
LM_snd.src= "/scada/resources/img/click.mp3";
LM_snd.load();
function LM_Pressed_Audio() {
LM_snd.play();
}
$(".item-control")
.on("vmousedown", function() {
LM_Pressed_Audio()
});
$(".btn")
.on("vmousedown", function() {
LM_Pressed_Audio()
});
});
It works very good And what I must add to give the user function of switching off this sound if he wants? Maybe some GA for volume status?