I think that the best solution is to use the option dialogClass
.
An extract from jquery UI docs:
during init : $('.selector').dialog({ dialogClass: 'noTitleStuff' });
or if you want after init. :
$('.selector').dialog('option', 'dialogClass', 'noTitleStuff');
So i created some dialog with option dialogClass='noTitleStuff' and the css like that:
.noTitleStuff .ui-dialog-titlebar {display:none}
too simple !! but i took 1 day to think why my previous id->class drilling method was not working. In fact when you call .dialog()
method the div you transform become a child of another div (the real dialog div) and possibly a 'brother' of the titlebar
div, so it's very difficult to try finding the latter starting from former.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…