Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Show Hong Kong districts when the Country field changes to "Hong Kong".
<script type="text/javascript">
// SalsaStaff 126206: Change the State options to be the Hong Kong districts as needed.
// @see
// @see
$(document).ready(function() {
var country = $('*[name=Country]');
if (country.length != 0) {
country.change(function() {
if (country.val() == 'HK') {
<select style="display: none;" id="hong-kong-districts">
<option value="">Please choose a district</option>
<option value="Central and Western">Central and Western</option>
<option value="Eastern">Eastern</option>
<option value="Islands">Islands</option>
<option value="Kowloon City">Kowloon City</option>
<option value="Kwai Tsing">Kwai Tsing</option>
<option value="Kwun Tong">Kwun Tong</option>
<option value="North">North</option>
<option value="Sai Kung">Sai Kung</option>
<option value="Sha Tin ">Sha Tin </option>
<option value="Sham Shui Po">Sham Shui Po</option>
<option value="Southern">Southern</option>
<option value="Tai Po">Tai Po</option>
<option value="Tsuen Wan">Tsuen Wan</option>
<option value="Tuen Mun">Tuen Mun</option>
<option value="Wan Chai">Wan Chai</option>
<option value="Wong Tai Sin">Wong Tai Sin</option>
<option value="Yau Tsim Mong">Yau Tsim Mong</option>
<option value="Yuen Long">Yuen Long</option>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.