Skip to content

Instantly share code, notes, and snippets.

@fillerwriter
Created June 6, 2013 14:46
Show Gist options
  • Save fillerwriter/5722060 to your computer and use it in GitHub Desktop.
Save fillerwriter/5722060 to your computer and use it in GitHub Desktop.
(function($) {
$(document).ready(function() {
$('select[name="County"]').hide();
$('select[name="Districts"]').hide();
$('select[name="State"]').change(function() {
if ($('select[name="State"]').val() !== '') {
$('select[name="County"]').show();
} else {
$('select[name="County"]').hide();
}
});
$('select[name="County"]').change(function() {
if ($('select[name="County"]').val() !== '') {
$('select[name="Districts"]').show();
} else {
$('select[name="Districts"]').show();
}
});
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment