Skip to content

Instantly share code, notes, and snippets.

@Mikke
Created August 16, 2012 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mikke/3368644 to your computer and use it in GitHub Desktop.
Save Mikke/3368644 to your computer and use it in GitHub Desktop.
манипуляции с кнопками
function dialogAlert(str, title) {
if('undefined' == typeof(title)) var title = '';
$('<div>').dialog({
modal: true,
title: title,
open: function (){
$(this).html(str);
$('.ui-dialog-buttonpane')
.find('button:contains("Ok")') // вот так я достаю кнопку
.removeClass('ui-button-text-only') // ниже манипуляции
.addClass('ui-button-text-icon')
.prepend('<span class="ui-icon ui-icon-trash"></span>');
},
buttons: {
Ok: function() {$( this ).dialog( "close" );}
},
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment