jQuery selecrors. help for newbie -
i have code, open new jquery-ui dialog , hide dialog's titlebar.
<div id="keyboard" class="keyboard dialogs">...</div>
$("#keyboard").dialog({ width: 1136, height: 437, position: ['center',400], closeonescape: false, autoopen: false, resizable: false, open: function(event, ui) { $(".ui-dialog-titlebar").hide(); // <-- selector want change } });
but $(".ui-dialog-titlebar") select titlebars. how have change selector hide titlebar?
to titlebar can this:
$(this).prev('.ui-dialog-titlebar').hide();
the dialog looks in html:
<div class="ui-dialog"> <div class="ui-dialog-titlebar"></div> <div id="keyboard" class="ui-dialog-content"> <!-- "this" element --> stuff </div> </div>
there more classes , such of course, need go 1 element, previous sibling this
titlebar want hide.
Comments
Post a Comment