I am trying to create an editable first item within my select list but the script listed below is throwing a 404. Is there an updated src i should be using?
<script type="text/javascript" src="jquery.editable-select.pack.js"></script>
Below is the code for my SelectList:
<td>@Html.DropDownListFor(m => m.test.model, new SelectList(new[] { "", "FCU", "Bellows" }), new { @id = "models"})</td>
This is the method for changing the edit:
$(function () {
$('#models').editableSelect({
bg_iframe: true,
onSelect: function (list_item) {
$('#results').html('List item text: ' + list_item.text() + '<br/> \
Input value: ' + this.text.val());
}
});
var select = $('.editable-select:first');
var instances = select.editableSelectInstances();
if (instances != null
&& instances != undefined
&& instances.length > 0) instances[0].addOption("Item 1");
});
I was unaware I was asking for the jquery-editable-select CDN.
<script src="https://cdn.jsdelivr.net/npm/jquery-editable-select@2.2.5/dist/jquery-editable-select.min.js"></script>
Found it here: