HEX
Server: Apache
System: Linux server1.panigaletech.com 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/concertium.com/public_html/wp-content/themes/dt-the7/js/script-zip.js
jQuery(document).ready(function(){
    
function is_int(value){ 
  if ((parseFloat(value) == parseInt(value)) && !isNaN(value)) {
    return true;
  } else { 
    return false;
  } 
}

jQuery("#citycls").hide();
jQuery("#statecls").hide();
jQuery(".zip-error").hide();

jQuery("#zip").keyup(function() {
    
  var el = jQuery(this);
  //alert(el.val());

  if ((el.val().length == 5) && (is_int(el.val()))) {
      
   
    // Make Ajax call, etc
    
  jQuery.ajax({
  url: "https://zip.getziptastic.com/v2/US/" + el.val(),
  cache: false,
  dataType: "json",
  type: "GET",
  data: "zip=" + el.val(),
  success: function(result, success) {

   // $(".fancy-form div > div").slideDown(); /* Show the fields */

    jQuery("#city").val(result.city); /* Fill the data */
    jQuery("#state").val(result.state);

    jQuery(".zip-error").hide(); /* In case they failed once before */
    jQuery(".zip-blank").hide();
    jQuery(".city-error").hide();
    jQuery(".state-error").hide();


    //jQuery("#address-line-1").focus(); /* Put cursor where they need it */
    
    jQuery("#citycls").slideDown();
    jQuery("#statecls").slideDown();

  },
  error: function(result, success) {
     

    jQuery(".zip-error").show(); /* Ruh row */
    jQuery("#citycls").hide();
    jQuery("#statecls").hide();

  }

});
 
  }
  else if (el.val().length < 5) {

    jQuery(".zip-error").show();
    jQuery("#citycls").hide();
    jQuery("#statecls").hide();

  }
  else {
      jQuery(".zip-error").show();
      jQuery("#citycls").hide();
      jQuery("#statecls").hide();
  }

})



jQuery("form").submit(function() {
    jQuery(this).find('input[type="submit"]').prop("disabled", true);
});

});





/**************************Document.ready end**************************/