Code isn't working

I’m trying to make a kind of puzzle on my site. I am trying to code it so that you have to type a code into an input field, but I’m really new to Velo coding. My code isn’t working. Can someone help me fix my code?


$w.onReady(function () {
        
    
    
    if($w('#input1').value = '8213') {
        $w("#button1").show();
    }
    else {
        $w("#button1").hide();
        }
} );
  

    
});

);

Hi, you can use the onChange event

$w.onReady(function () {
    $w('#input1').onChange((event)=>{
        if(event.target.value == '8213'){
            $w('#button1').show()
        }else{
            $w('#button1').hide()
        }
    })
});

And you should use triple equals (strict mode):
if(event.target.value === ‘8213’)