skip to Main Content

Javascript – How to assign different audio to different buttons after clicked event

<h1 id="title">Drum 🥁 Kit</h1> <div class="set"> <button class="w drum">w</button> <button class="a drum">a</button> <button class="s drum">s</button> <button class="d drum">d</button> <button class="j drum">j</button> <button class="k drum">k</button> <button class="l drum">l</button> </div> var tekan = document.querySelectorAll(".drum"); tekan.forEach(drum => { drum.addEventListener("click", play); }) function play()…

VIEW QUESTION

Remove css hover effect on click Jquery

This code seems not to work. The text stays blue on hover, but I want it to be red instead after clicking this text. Tried several actions, but none of them works $('.secondary').click(function() { $(this).unbind('mouseenter mouseleave'); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <style…

VIEW QUESTION
Back To Top
Search