Alex
Alex

Reputation: 693

jquery ui dialog custom buttons

Is there a way to use my own custome button style in the jquery ui dialog widget? I have tried all possible ways, including some suggested on the site here, all to no avail... Any help would be greatly appreciated! Thanks!

Upvotes: 2

Views: 5428

Answers (2)

Rahul Saini
Rahul Saini

Reputation: 41

Thats how I handled my custom buttons on jquery UI dialog box :

        $('#dialog').dialog({
            height: 300, 
            width: 600, 
            modal: true, 
            resizable: false, 
            create: function(event, ui) { 
                $("#done").click(function(event) {
                    $('#dialog').dialog('close');
            })}
        });

Where 'done' is ID of my button element and 'dialog' is id of my div acting as dialog box.

Upvotes: 4

andyb
andyb

Reputation: 43823

The simplest and easiest way to define your own style is to use the jQuery UI Themeroller to create a custom theme (or just modify an existing one). All jQuery UI widgets will use the theme you declare.

Edit: Demo of modified button style only.

Upvotes: 0

Related Questions