Sha256: 52966ad40be27143d046936c2da8e9b688eb539d47baf7ee17864db179df6414
Contents?: true
Size: 1.15 KB
Versions: 76
Compression:
Stored size: 1.15 KB
Contents
$(function () { var countryBased = $('#country_based') var stateBased = $('#state_based') countryBased.click(show_country) stateBased.click(show_state) if (countryBased.is(':checked')) { show_country() } else if (stateBased.is(':checked')) { show_state() } else { show_state() stateBased.click() } }) // eslint-disable-next-line camelcase function show_country () { $('#state_members :input').each(function () { $(this).prop('disabled', true) }) $('#state_members').hide() $('#zone_members :input').each(function () { $(this).prop('disabled', true) }) $('#zone_members').hide() $('#country_members :input').each(function () { $(this).prop('disabled', false) }) $('#country_members').show() } // eslint-disable-next-line camelcase function show_state () { $('#country_members :input').each(function () { $(this).prop('disabled', true) }) $('#country_members').hide() $('#zone_members :input').each(function () { $(this).prop('disabled', true) }) $('#zone_members').hide() $('#state_members :input').each(function () { $(this).prop('disabled', false) }) $('#state_members').show() }
Version data entries
76 entries across 76 versions & 1 rubygems