newb Qu, themerolling jQuery UI - how to get border thickness and background fade
I'm using jQuery UI which seems great but I'm trying to customise it with it's themeroller app. http://jqueryui.com/themeroller/ I'm using a dialog to popup a modal window
I can see that I can control the color of borders 开发者_开发问答but I can't see how I'm meant to change the thickness of them. For example in the content section (the above link and look right) you can change color but not thickness.
Also when the modal window appears I'd like the background to fade to the overlayed color rather than just flick to it. Is there somewhere I can control this?
cheers :)
Themeroller can't do that for you. You will have to add this yourself to your CSS file. For example, if you want the thickness of the dialog border to be 3px, add
.ui-dialog { border-width: 3px }
If you want to modify all widgets' border thickness, then do
.ui-widget-content { border-width: 3px }
To make dialog fade in instead of just appearing, you will have to modify your JavaScript code that creates a dialog. Since 'show' and 'hide' only affect the dialog itself (not the overlay) you will have to fade overlay manually:
$('<div/>').dialog({
show: 'fade',
hide: 'fade',
modal: true,
open: function( e, ui ) {
$('.ui-widget-overlay').hide().fadeIn()
}
})
精彩评论