I am trying to automatically show a div when a value is assigned to a input element.
So far i am using keyup function, but this works only if i typed in a value. How can i show/hide a div if the value is assigned to the input without me typing it in?
Here is what i have.
<script> $("#ven_id").keyup(function(){ if($(this).val()) { $(".inv_item").slideDown(500); } else { $(".inv_item").slideUp(500); } }); </script> any suggestions?