Created
August 16, 2012 09:08
-
-
Save Mikke/3368644 to your computer and use it in GitHub Desktop.
манипуляции с кнопками
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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