1

I have jQuery dialog working with my custom theme. I would like to use the "ui-state-error" css class to show errors in a dialog with that style. How do I incorporate that style within my own custom theme?

thanks.

2 Answers 2

3

Add the class name to your class attribute for the div.

<div id="dialog" class="ui-state-error">
<p class="ui-state-error-text">ERROR DIALOG TEXT</p>
</div>

http://jqueryui.com/docs/Theming/API

Also, you may need to add the class after you make the dialog.

$("#dialogID").dialog();
$("#dialogID").addClass("ui-state-error");
Sign up to request clarification or add additional context in comments.

Comments

1

If you just want to paint the title you can do:

$( "#dialogID" ).dialog({ autoOpen: false }).parent().children(".ui-dialog-titlebar").addClass('ui-state-error');

Comments

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.