Change and reinitialized autocomplete


I’m use jQuery Autocomplete
I have some code.
I try modify “source” autocomplete by select, but when i change source autocomplete don’t work. I try use .change, .on, .click for reinitialized but still not working.
When i’m use not modify source, autocomplete work fine.

$('#myselect').change(function() {
$('#part_q').prop("disabled", false).focus();
var brand = $('#myselect').val();
<script src=""></script>
<script src=""></script>
<select id="myselect">
		<option value="" selected="selected" disabled="">Select Brand</option>
            <option value="1">Some brand</option>
            <option value="2">Some brand 2</option>
            <option value="3">Some brand 3</option>
        <input disabled="" placeholder="Model Name" type="text" id="part_q" name="part_q">

Link: Change and reinitialized autocomplete
Source: Stack Jquery


About Author

Leave A Reply