mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
6f4884f6f5
Ref #7053 Ref gh-1411
29 lines
1021 B
JavaScript
29 lines
1021 B
JavaScript
(function( $ ) {
|
|
|
|
module( "dialog (deprecated): options" );
|
|
|
|
test( "dialogClass", function() {
|
|
expect( 6 );
|
|
|
|
var element = $( "<div>" ).dialog(),
|
|
widget = element.dialog( "widget" );
|
|
equal( widget.is( ".foo" ), false, "dialogClass not specified. class not added" );
|
|
element.remove();
|
|
|
|
element = $( "<div>" ).dialog({ dialogClass: "foo" });
|
|
widget = element.dialog( "widget" );
|
|
equal( widget.is( ".foo" ), true, "dialogClass in init, foo class added" );
|
|
element.dialog( "option", "dialogClass", "foobar" );
|
|
equal( widget.is( ".foo" ), false, "dialogClass changed, previous one was removed" );
|
|
equal( widget.is( ".foobar" ), true, "dialogClass changed, new one was added" );
|
|
element.remove();
|
|
|
|
element = $( "<div>" ).dialog({ dialogClass: "foo bar" });
|
|
widget = element.dialog( "widget" );
|
|
equal( widget.is( ".foo" ), true, "dialogClass in init, two classes. foo class added" );
|
|
equal( widget.is( ".bar" ), true, "dialogClass in init, two classes. bar class added" );
|
|
element.remove();
|
|
});
|
|
|
|
})( jQuery );
|