mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
540b78d920
comparisons. Comparing innerHTML is too dependent on random browser quirks like IE only sometimes rendering closing tags.
38 lines
846 B
JavaScript
38 lines
846 B
JavaScript
(function( $ ) {
|
|
|
|
module( "accordion: methods", accordionSetupTeardown() );
|
|
|
|
test( "destroy", function() {
|
|
domEqual("#list1", function() {
|
|
$("#list1").accordion().accordion("destroy");
|
|
});
|
|
});
|
|
|
|
test( "enable/disable", function() {
|
|
var accordion = $('#list1').accordion();
|
|
state( accordion, 1, 0, 0 );
|
|
accordion.accordion( "disable" );
|
|
accordion.accordion( "option", "active", 1 );
|
|
state( accordion, 1, 0, 0 );
|
|
accordion.accordion( "enable" );
|
|
accordion.accordion( "option", "active", 1 );
|
|
state( accordion, 0, 1, 0 );
|
|
});
|
|
|
|
test( "refresh", function() {
|
|
var expected = $( "#navigation" )
|
|
.parent()
|
|
.height( 300 )
|
|
.end()
|
|
.accordion({
|
|
heightStyle: "fill"
|
|
});
|
|
equalHeights( expected, 246, 258 );
|
|
|
|
expected.parent().height( 500 );
|
|
expected.accordion( "refresh" );
|
|
equalHeights( expected, 446, 458 );
|
|
});
|
|
|
|
}( jQuery ) );
|