#6065 closed bug (worksforme)
closeText does not appear
Reported by: | rmariuzzo | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.dialog | Version: | 1.8.4 |
Keywords: | closeText, dialog, workaround | Cc: | |
Blocked by: | Blocking: |
Description
The closeText's jQuery UI Dialog option does not work when set. For example:
$('.selector').click(function(){ $('#line-info').dialog({ closeText: 'close' }); });
This previous code does not work. A workaround that I am using is this:
$('.ui-dialog').live('dialogopen', function(event, ui) { var $this = $(this); var $icon = $this.find('.ui-dialog-titlebar-close .ui-icon'); if ($icon && !$icon.is(':empty')) { var $closetext = $this.find('.ui-dialog-closetext'); if ($closetext.length > 0) { $closetext.text($icon.text()); } else { $icon.after('<span class="ui-dialog-closetext">' + $icon.text() + '</span>').empty(); } } });
Change History (3)
comment:1 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
From http://docs.jquery.com/UI/Dialog#option-closeText "Note that the close text is visibly hidden when using a standard theme."
Note: See
TracTickets for help on using
tickets.
Works for me: http://jsbin.com/ojuni3