Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#to-top").click(function(e){
- var bas_name = $("#inp_name").val();
- var bas_address = $("#inp_address").val();
- var bas_zipcode = $("#inp_zipcode").val();
- var bas_city = $("#inp_city").val();
- if(bas_name === "" || bas_address === "" || bas_zipcode === "" || bas_city === "") {
- $("body").animate({scrollTop: 0});
- } else {
- e.preventDefault();
- $("#form").submit();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement