Skip to content

Instantly share code, notes, and snippets.

@ABooooo
Created February 15, 2018 15:10
Show Gist options
  • Save ABooooo/b4b9dd95b71ed0ec89f51e4274105dbb to your computer and use it in GitHub Desktop.
Save ABooooo/b4b9dd95b71ed0ec89f51e4274105dbb to your computer and use it in GitHub Desktop.
read input name variable
$("input[name*='marker_04']").change(function(){
var max= 3;
if( $("input[name*='marker_04']:checked").length == max ){
$("input[name*='marker_04']").attr('disabled', 'disabled');
$("input[name*='marker_04']:checked").removeAttr('disabled');
}else{
$("input[name*='marker_04']").removeAttr('disabled');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment