Skip to content

Instantly share code, notes, and snippets.

@FabioRodrigues
Created December 1, 2011 18:57
Show Gist options
  • Save FabioRodrigues/1418984 to your computer and use it in GitHub Desktop.
Save FabioRodrigues/1418984 to your computer and use it in GitHub Desktop.
DesabilitarNós
<script type="text/javascript">
$(document).ready(
function () {
// DesabilitarTodosNaoChecados();
var input = $("form input:checkbox");
input.click(function () {
var elemento = $(this);
DesabilitarTodosNaoChecados(elemento);
});
}
);
function DesabilitarTodosNaoChecados(elem) {
var input = $("form input:checkbox");
input.each(function () {
this.checked = false;
});
elem[0].checked = true;
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment