I'm getting a problem with Jquery and Checkboxes.
For example, I've got this:

```
<input type="checkbox" name="guest" value="1" />
<input type="checkbox" name="guest" value="2" />
<input type="checkbox" name="guest" value="3" />

<input type="text" id="player-1" />
<input type="text" id="player-2" />
<input type="text" id="player-3" />

```

My question, and what I've been searching, is how to disable an input[type=text] with JQuery.

This is my code:

```
<script>
$("input").on("click", function() {
var i = $("input:checked").val();
if(this.checked)
$("#player-"+i).attr("disabled", "disabled");
else
$("#player-"+i).removeAttr("disabled");
});
</script>

```

May there's something wrong I don't get, but when i click a checkbox, it disable the first text, if I decheck it, nothing happends until I check one of the other one.

Thanks for your time!!!