Sha256: 3fa1500309cf41160a46c1701c1c5bcfadaf393bb80e78ac2eaa8c4f5fea4768
Contents?: true
Size: 495 Bytes
Versions: 4
Compression:
Stored size: 495 Bytes
Contents
export default function() { $('input[name="login"]').click(function(){ let $radio = $(this); // if this was previously checked if ($radio.data('waschecked') === true) { $radio.prop('checked', false); $radio.data('waschecked', false); } else $radio.data('waschecked', true); // remove was checked from other radios $radio.siblings('input[name="login"]').data('waschecked', false); }); }
Version data entries
4 entries across 4 versions & 1 rubygems