Skip to content

Instantly share code, notes, and snippets.

@joemeador
Last active August 29, 2015 13:57
Show Gist options
  • Save joemeador/9840604 to your computer and use it in GitHub Desktop.
Save joemeador/9840604 to your computer and use it in GitHub Desktop.
Form autofill city and state
jQuery('.cat-request .info_block.city').hide();
jQuery('.cat-request .info_block.state').hide();
jQuery('.cat-request .field_error').hide();
jQuery('#bronto select').change(function () {
jQuery('.cat-request .info_block.city').slideDown(); /* Show the fields */
jQuery('.cat-request .info_block.state').slideDown(); /* Show the fields */
jQuery('.field_error').remove();
jQuery(document).ajaxStop(function() {
jQuery('.cat-request .info_block.city input').val('');
jQuery('.cat-request .info_block.state input').val('');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment