I am currently working in a woocommerce checkout form. By default the form comes pre populated. So I disabled the propopulated form and if the user wants to edit then he should upload his address proof. I am using WC checkout addons plugin where it uses some advanced drag and drop to upload file. And they preview the file with "preview" class So I decided to check whether the file is uploaded or not using preview class. 

If preview class is hidden then it denotes file isn't uploaded so I disabled place order button.
But 

```
 if ($("#wc_checkout_add_ons div").hasClass("preview hide")) {
      $("#place_order").prop("disabled", true);
    }

```

thing reloading entire page.

```
(function ($) {
    $('input, select').keypress(function (event) {
        return event.keyCode != 13;
    });
    $("div.woocommerce-billing-fields").addClass("disableme");
    $("div#wc_checkout_add_ons").addClass("hide-me");
    $(document).ready(function () {
        $("#edit_addr").click(function () {
            alert("Clicked");
            $("div.woocommerce-billing-fields").removeClass("disableme");
            $("div#wc_checkout_add_ons").removeClass("hide-me");
            if ($("#wc_checkout_add_ons div").hasClass("preview hide")) {
                $("#place_order").prop("disabled", true);
            }
        });
    });
})(jQuery);

```

I am a super newbie and did all these code by searching stackoverflow. So, I am open to advice too. thank you everyone in advance.