Skip to content

Commit

Permalink
Accordion: Renamed resize method to refresh. Fixes #6838 - Accordion:…
Browse files Browse the repository at this point in the history
… Rename resize method to refresh.
  • Loading branch information
scottgonzalez committed Jan 14, 2011
1 parent eabb391 commit 1b2f6ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/unit/accordion/accordion_methods.js
Expand Up @@ -114,14 +114,14 @@ test("activate, jQuery or DOM element", function() {
state(ac, 0, 1, 0);
});

test("resize", function() {
test("refresh", function() {
var expected = $('#navigation').parent().height(300).end().accordion({
fillSpace: true
});
equalHeights(expected, 246, 258);

expected.parent().height(500);
expected.accordion("resize");
expected.accordion("refresh");
equalHeights(expected, 446, 458);
});

Expand Down
7 changes: 5 additions & 2 deletions ui/jquery.ui.accordion.js
Expand Up @@ -80,7 +80,7 @@ $.widget( "ui.accordion", {
self.active.next().addClass( "ui-accordion-content-active" );

self._createIcons();
self.resize();
self.refresh();

// ARIA
self.element.attr( "role", "tablist" );
Expand Down Expand Up @@ -223,7 +223,7 @@ $.widget( "ui.accordion", {
}
},

resize: function() {
refresh: function() {
var options = this.options,
maxHeight;

Expand Down Expand Up @@ -697,4 +697,7 @@ $.extend( $.ui.accordion, {
};
}( jQuery, jQuery.ui.accordion.prototype ) );

// resize method
jQuery.ui.accordion.prototype.resize = jQuery.ui.accordion.prototype.refresh;

})( jQuery );

0 comments on commit 1b2f6ce

Please sign in to comment.