I have created a dynamic text field and button. I want to apply UI button method on button but it is not working. Below is my code.
this.marketSymbolAddDialogObject
= $('<b>Symbol:</b> <input type="text" id="symbolName" class="ui-widget ui-widget-content ui-corner-all"></input>'+
'<button id="add_symbol">Add Symbol</button>'
);
var bt = this.marketSymbolAddDialogObject.find("button");
bt.button(); // **Not working**
what exactle i am doing wrong in it. I have also tried this
$(“#add_symbol”).button()
but not working.
You need to actually add the element to the DOM first before the find will work, I believe.