this may be due to the specific way i learned to do this but i am trying to set the volume of sound on a page of mine to not be full but am unable to figure out how/where to add the string in order to adjust it with the specific javascript string i have going
this is the string i have right now
$(document).ready(function(){
let music = document.getElementById(“music”);
$(“#soundControl”).click(function(){
if (music.paused) {
$(“#music”).trigger(“play”);
$(“#soundControl”).attr(“src”, “handanim.gif”);
else {
$(“#music”).trigger(“pause”);
$(“#soundControl”).attr(“src”, “handanim.gif”);<code>}</code><code>} </code>}
});
});
i can’t seem to figure out where to put in the volume setting function and keep coming up with nothing when searching. note that i am fairly new to coding and this was simply the way that i was taught to do this specific action, and am totally open to trying something else entirely so long as the results are the same (using an image to toggle the music on/off and getting it not at full blast)
cursedimages is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.