Convert this JavaScript to Jquery [closed]

Here is what I need to convert. Any help would be greatly appreciated! TIA!

document.getElementById("color1").addEventListener("click",
            function() {
                document.getElementById("JS1").style.backgroundColor = 
                    document.getElementById("color1").value;
            });

Here is what I’ve tried so far.

$('#color1').on('click',function(){
            $('#JS1').css('background-color',$('#color1').val());
                });