How to hide/close div/form elements when clicking outside it

      
       var mouse_in = false;
        $('#new_request').hover(function(){
            mouse_in=true;
        }, function(){
            mouse_in=false;
        });
        $("body").mouseup(function(){
            if(! mouse_in {
                $('.fullform').each(function() {
                    $(this).hide();
                });
            }
        });
     
    // This will hide some of the form elements with class fullform when clicked outside the form where form id is new_request

    <form id="new_request">
      <input type="text" name="username">
      <input type="text" name="email">
      <input type="text" name="age" class="fullform">
      <input type="text" name="city" class="fullform">
    </form>
    5
    Average: 5 (1 vote)