JS/Jquery Disappear on focus next element / jquery on focus on element hide previous element after there has been an input
I have the code:
<script> $(document).ready(function(){ $("div").click(function(){ $("#hide").hide(); }); ); </script> The above hides the element 'div' onclick. What I am really looking for is when I have filled the first field, and click on the second one, then it should hide the first one. The div should slide out. For eg I have 5 fields as Name, Email, DOB, Address, Post Code. So when I have entered my Name, and click on Email, the Name DIV should disappear by sliding out. I am new to JQuery.
How can I do this?
Thanks