I cannot seem to click the parent of a select
when it is disabled. I'm trying to allow the user to unlock inputs by clicking them, but it only works for inputs
.
let $input = $('input')
$input.parent().click(function() {
$input.prop('disabled', false);
})
let $select = $('select')
$select.parent().click(function() {
$select.prop('disabled', false);
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="parent">
<input name="name" disabled placeholder="click me">
</div>
<div class="parent">
<select name="thing" disabled>
<option value="1">1</option>
</select>
</div>