How to hide a div on keyup using JavaScript

Hide a Div Using JavaScript on On keyup or On Click event

Hi guys, today We are going to discuss about how to hide  div on keyup or on click event using JavaScript and Jquery. This is very easy to hide  div on an event of on click or on keyup using JavaScript.
Here we are going in details about to hide a div on keyup event. Let see the below code for example.

<script>
$(document).ready(function(){
$('#find').keyup(function() { 
 
$( "#list-products_wrapper" ).hide("slow"); 
 }); 
});

</script>

Here is

“#find” is representing is an id of input box on which on keyup event is working.

“#list-products_wrapper” is an id of div which you are interested to hide on keyup events.

Also See:

Jquery show div on click