How can add a css style when do keydown but remove at end of keydown?

Something like

$('#status').keydown(function()
	{
		$('#insert').css('border-left','1px solid green');
	});
});

But is happens only one time? How can do with it something like add when keydown after remove and again as write? Any idea?

I want an effect something like when write is always show a little border and hide after it. So only that time when do keydown.

Thank you!

You need also listen to keyup and revert the initial style:

https://codepen.io/jenovs/pen/VJmyNq

1 Like

Amazing! :slight_smile: I see you pure javascript fan :stuck_out_tongue: