I am trying to disable a HTML input tag with type="file" which I am using to upload images. I am using the Radio options to indicate Yes or No. If the user clicks no - it should disable the input text box. This is the code I used but I don't know what I have done wrong.
$('#inputattrib').change(function() {
$('#images').prop('disabled', false);
});
$('#inputattribf').change(function() {
$('#images').prop('disabled', true);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div class="form-group">
<p> Indicate Payment Method:</p>
<input id="inptrue" type="radio" name="pmethod" value="Yes">Yes
<input id="inpfalse" type="radio" name="pmethod" value="No">No
</div>
<div class="form-group">
<label for="file">Upload your Payment Evidence: <i>for Bank Deposit only</i></label>
<input id="images" type="text" name="file" class="form-first-name form-control">
</div>
<input id="images" type="text"#inputattrib?