jquery - How to update the div in the respective td in a table which is created by clone method -


i have created dynamic table using clone method. have placed search box , div in each td of table.

now on selection of item search box, trying display in selected value in div present in same cell. working first cell. not other dynamically created cells.

please me. thanks. here code snippet :

    var input = $("<input type='text'>").appendto(td);     input.autocomplete({         source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"],         minlength: 3,         select: function(event, ui ) {             $( "<div>" ).text( "selected: " + ui.item.value ).prependto( "#log" );             $( "#log" ).scrolltop( 0 );         }     });     $('<div>').attr({ class: ["ui-widget"],  style : "margin-top:2em; font-family:arial" }).appendto(td);     $('<div>').attr({ id:"log" ,class: "ui-widget-content",  style : "height: 75px; width: 250px; overflow: auto;" }).appendto(td); 

you can have @ demo here : demo


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -