Skip to content

Commit

Permalink
Accordion: Remove deprecated content property in create event. Fixes …
Browse files Browse the repository at this point in the history
…#8999 - Accordion: Remove content property from create event.
  • Loading branch information
scottgonzalez committed Mar 15, 2013
1 parent 0cc40d7 commit 43442c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions tests/unit/accordion/accordion_events.js
Expand Up @@ -6,7 +6,7 @@ var setupTeardown = TestHelpers.accordion.setupTeardown,
module( "accordion: events", setupTeardown() );

test( "create", function() {
expect( 15 );
expect( 10 );

var element = $( "#list1" ),
headers = element.children( "h3" ),
Expand All @@ -18,8 +18,6 @@ test( "create", function() {
strictEqual( ui.header[ 0 ], headers[ 0 ], "header" );
equal( ui.panel.length, 1, "panel length" );
strictEqual( ui.panel[ 0 ], contents[ 0 ], "panel" );
equal( ui.content.length, 1, "content length" );
strictEqual( ui.content[ 0 ], contents[ 0 ], "content" );
}
});
element.accordion( "destroy" );
Expand All @@ -31,8 +29,6 @@ test( "create", function() {
strictEqual( ui.header[ 0 ], headers[ 2 ], "header" );
equal( ui.panel.length, 1, "panel length" );
strictEqual( ui.panel[ 0 ], contents[ 2 ], "panel" );
equal( ui.content.length, 1, "content length" );
strictEqual( ui.content[ 0 ], contents[ 2 ], "content" );
}
});
element.accordion( "destroy" );
Expand All @@ -43,7 +39,6 @@ test( "create", function() {
create: function( event, ui ) {
equal( ui.header.length, 0, "header length" );
equal( ui.panel.length, 0, "panel length" );
equal( ui.content.length, 0, "content length" );
}
});
element.accordion( "destroy" );
Expand Down
3 changes: 1 addition & 2 deletions ui/jquery.ui.accordion.js
Expand Up @@ -65,8 +65,7 @@ $.widget( "ui.accordion", {
_getCreateEventData: function() {
return {
header: this.active,
panel: !this.active.length ? $() : this.active.next(),
content: !this.active.length ? $() : this.active.next()
panel: !this.active.length ? $() : this.active.next()
};
},

Expand Down

0 comments on commit 43442c3

Please sign in to comment.