aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.accordion.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-05-30 14:40:03 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-05-30 14:41:58 +0200
commite0fe788ee0c0c0d8d23f9d90b9acff713ba1302f (patch)
treec56ad742f11119f9af5f081986d0c53f1e4c7ddc /ui/jquery.ui.accordion.js
parentf5954fcd743079058dd0b2113dca3c029072e4dd (diff)
downloadjquery-ui-e0fe788ee0c0c0d8d23f9d90b9acff713ba1302f.tar.gz
jquery-ui-e0fe788ee0c0c0d8d23f9d90b9acff713ba1302f.zip
Accordion: Update activate and beforeActivate event properties to newPanel/oldPanel (instead of content). Fixes #6840 and #6842
Diffstat (limited to 'ui/jquery.ui.accordion.js')
-rw-r--r--ui/jquery.ui.accordion.js24
1 files changed, 17 insertions, 7 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 0f1455790..856b3ba4b 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -389,9 +389,9 @@ $.widget( "ui.accordion", {
toHide = active.next(),
eventData = {
oldHeader: active,
- oldContent: toHide,
+ oldPanel: toHide,
newHeader: collapsing ? $() : clicked,
- newContent: toShow
+ newPanel: toShow
};
event.preventDefault();
@@ -437,8 +437,8 @@ $.widget( "ui.accordion", {
},
_toggle: function( data ) {
- var toShow = data.newContent,
- toHide = this.prevShow.length ? this.prevShow : data.oldContent;
+ var toShow = data.newPanel,
+ toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
// handle activating a panel during the animation for another activation
this.prevShow.add( this.prevHide ).stop( true, true );
@@ -524,7 +524,7 @@ $.widget( "ui.accordion", {
},
_toggleComplete: function( data ) {
- var toHide = data.oldContent;
+ var toHide = data.oldPanel;
toHide
.removeClass( "ui-accordion-content-active" )
@@ -676,9 +676,19 @@ if ( $.uiBackCompat !== false ) {
}
if ( type === "beforeActivate" ) {
- ret = _trigger.call( this, "changestart", event, data );
+ ret = _trigger.call( this, "changestart", event, {
+ oldHeader: data.oldHeader,
+ oldContent: data.oldPanel,
+ newHeader: data.newHeader,
+ newContent: data.newPanel
+ });
} else if ( type === "activate" ) {
- ret = _trigger.call( this, "change", event, data );
+ ret = _trigger.call( this, "change", event, {
+ oldHeader: data.oldHeader,
+ oldContent: data.oldPanel,
+ newHeader: data.newHeader,
+ newContent: data.newPanel
+ });
}
return ret;
};