Created
December 1, 2011 18:57
-
-
Save FabioRodrigues/1418984 to your computer and use it in GitHub Desktop.
DesabilitarNós
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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