Here is the code that when moving the slider adds a picture, I need to translate it into jQuery. Help please please.
function funVolume() { var rng = document.getElementById('r1'); //rng - это Input var p = document.getElementById('one'); // span - span var vol_3 = document.getElementsByClassName('vol_3'); var value = rng.value; if(value < 50) { p.innerHTML = "<img style='margin: 7px -4px 0 0' src ='img/vol_2.png'>"; } else if (value > 50) { p.innerHTML = "<img style='margin: 7px -4px 0 0' src ='img/vol_2.png'><img style='margin: 3px 0 0 0' src ='img/vlo_3.png'>"; } if(value < 1){ p.innerHTML = " "; } }
getElementById=$("#id")andgetElementsByClassName=$(".class"), and alsoinnerHTML=$(elem).html('что-то');- Alexander Igorevich