Actually the first time autofilling works. When I open the dialog a second time, then auto-complete does not work anymore.
var create_product = function () { isEdit = false; $(".dialog_create_product").dialog({ autoOpen: true, width: 800, modal: true, buttons: {}, open: function (event, ui) { $( ".getInputComponent" ).autocomplete({ source: ['1','2','3'], }); }, close: function (event, ui) { $(".dialog_create_product").dialog("destroy") }, beforeClose: function (event, ui) { closeDialog(); } }); }; html
<div class="divInput"align="center"> <input class = "getInputComponent" placeholder="название компонента" type="text" maxlength="50"><button class="addComponent" >Добавить компонент</button> </div>
$(".dialog_create_product").on( "dialogopen", function( event, ui ) {$( ".getInputComponent" ).autocomplete({source: ['1','2','3']});} );and not in the constructor like yours, and write down the result - Vyacheslav Danshin$(document).on( "dialogopen", function( event, ui ) {$( ".getInputComponent" ).autocomplete({source: ['1','2','3']});} );it still only works once. C$(".dialog_create_product").ondoes not work at all - Bogdan Shulga