Append string to jquery-ui-dialog title -
so need know how can append string dialog title.
for example string foo.
and if run
$("#dialogid").dialog("option", "title", "bar")
in js console, title should foobar.
edit:
basically line of code shouldn't change. if run line of code, title change foobar
edit2:
so i've come solution problem, still have no idea how make happend @ once, not after 10 ms
$(function () { $("#dialogid").dialog({}) $("#dialogid").dialog('option', 'title', 'bar'); setinterval(function(){ var title123 = $("#dialogid").dialog( "option", "title" ); var n = title123.indexof("foo"); if(n < 0) { $("#dialogid").dialog( "option", "title", "foo" + title123); } }, 10); });
here jsfiddle link http://jsfiddle.net/tridip/rxv8r/18/
$(function () { $("#dialog").dialog({}) //init title text $("#dialog").dialog('option', 'title', 'foo'); //later change text $("#dialog").dialog('option', 'title', $("#dialog").dialog('option', 'title')+' bar'); });
if area not clear aks me please.
Comments
Post a Comment