aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-11-16 07:59:21 -0500
committerScott González <scott.gonzalez@gmail.com>2011-11-16 08:00:03 -0500
commite5464f8f19f2026487bdffb465c6e77498449032 (patch)
treee6716e1e69633176903040f69eaea2c303966445
parentf0f54e38d8eab613d7ea25d698b81126e5263d83 (diff)
downloadjquery-ui-e5464f8f19f2026487bdffb465c6e77498449032.tar.gz
jquery-ui-e5464f8f19f2026487bdffb465c6e77498449032.zip
Accordion: Fixed back-compat for icons.headerSelected when icons option is null.
-rw-r--r--demos/accordion/custom-icons.html2
-rw-r--r--ui/jquery.ui.accordion.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/demos/accordion/custom-icons.html b/demos/accordion/custom-icons.html
index de57f28b1..2351b9bb0 100644
--- a/demos/accordion/custom-icons.html
+++ b/demos/accordion/custom-icons.html
@@ -20,7 +20,7 @@
icons: icons
});
$( "#toggle" ).button().toggle(function() {
- $( "#accordion" ).accordion( "option", "icons", false );
+ $( "#accordion" ).accordion( "option", "icons", null );
}, function() {
$( "#accordion" ).accordion( "option", "icons", icons );
});
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 6eb496a43..8289ee81b 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -628,8 +628,10 @@ if ( $.uiBackCompat !== false ) {
var _createIcons = prototype._createIcons;
prototype._createIcons = function() {
- this.options.icons.activeHeader = this.options.icons.activeHeader ||
- this.options.icons.headerSelected;
+ if ( this.options.icons ) {
+ this.options.icons.activeHeader = this.options.icons.activeHeader ||
+ this.options.icons.headerSelected;
+ }
_createIcons.call( this );
};
}( jQuery, jQuery.ui.accordion.prototype ) );