Skip to content

Instantly share code, notes, and snippets.

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 juniarto-samsudin/13ed339ff7133ed57aa7258d1bfa34cf to your computer and use it in GitHub Desktop.
Save juniarto-samsudin/13ed339ff7133ed57aa7258d1bfa34cf to your computer and use it in GitHub Desktop.
radio button get first and such
//GET FIRST VALUE OF RADIO OPTION LIST
let firstVal = $('input[type=radio][name=runOption]:first').val()
console.log("FIRSTVAL: ", firstVal)
{{ form.jobRun(class="btn btn-fill btn-primary pull-right",onclick="revertBack()") }}
function revertBack(){
alert("Hello")
$('input[type=radio][name=runOption]:first').prop('checked',true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment