Skip to content

Instantly share code, notes, and snippets.

@hugolcouto
Created April 20, 2019 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugolcouto/6a4272e009e709e00f9b111d1230d1b9 to your computer and use it in GitHub Desktop.
Save hugolcouto/6a4272e009e709e00f9b111d1230d1b9 to your computer and use it in GitHub Desktop.
// Adicionar no arquivo main.js
$('.form__radio').on('click', 'label', (e) => {
if(!$(e.target).hasClass('checked') && $(e.target).is('label')) {
$(e.target).addClass('checked').parent().siblings('.form__radio').find('label').removeClass()
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment