If have a variable data = '<div>... <button id="remember"> ... </button> ...</div>'
, is it possible to apply the .button();
method to a button inside that variable?
I've tried the following:
$('#remember', data).button();
but that doesn't work. After that i just do $(data).dialog();
, which works.
I've come with a workaround and that's to append
the variable data
to the document, call the .button()
and then call the .dialog()
, but appending and removing dialog's divs
on the document doesn't seems right.