Sha256: 024c68887f82c8da37af54a1c2cbb994af9677d395f911b516522181fa35db50
Contents?: true
Size: 1.18 KB
Versions: 16
Compression:
Stored size: 1.18 KB
Contents
document.addEventListener("spree:load", 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
16 entries across 16 versions & 1 rubygems