0

I know that you can use the jQuery-UI widgets like buttons with icons. For example:

$('#MyButton1').button({
   icons: {
      primary: "ui-icon-search"
   }
});

But how you can insert a button with an icon into a dialog?

$('#MyDialog').dialog({ 
   buttons: {
      "Ok": function() {
      }
   }
});
2
  • you can use css, to add this icon Commented Feb 21, 2012 at 3:38
  • possible duplicate of jQuery UI Dialog Button Icons Commented Feb 21, 2012 at 3:49

1 Answer 1

4

Duplicate question.. find your answer here: jQuery UI Dialog Button Icons

[....]
open: function() {
                $('.ui-dialog-buttonpane').
                    find('button:contains("Cancel")').button({
                    icons: {
                        primary: 'ui-icon-cancel'
                    }
                });
[....]
Sign up to request clarification or add additional context in comments.

1 Comment

I know you can't vote to close yet, but posting this as a comment would have been more appropriate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.