All the places where I (successfully) installed the text of the jQuery UI Dialog button stopped working. Buttons appear and they work correctly, but the text does not appear in all tested browsers (IE, Safari, Chrome, Firefox, and Opera). Using the Chrome inspector and Firebug, it seems that the text is not even set on the button, and is not a CSS problem).
The only thing that has changed recently is that we switched to jQuery 1.8.0 with jQuery UI 1.8.22 and are not able to downgrade again.
The above example can be found at jsFiddle http://jsfiddle.net/F7pGu/
HTML example :
<div id="form"> <h1>Blah</h1> </div> <button id="array-test">Array Test</button> <button id="object-test">Object Test</button>
JavaScript example :
var $form = $('#form'), $arrTest = $('#array-test'), $objTest = $('#object-test'); $arrTest.click(function(){ $form.dialog({ buttons: [ { text: 'Cancel' }, { text: 'Save' } ] }); }); $objTest.click(function(){ $form.dialog({ buttons: { 'Cancel': function () {}, 'Save': function () {} } }); });â
I can not find anything wrong with reading the documentation. We have always used the object test method, but the documentation now mentions an array validation method.
source share