Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / examples / shared / extjs / site.js
1 Ext.onReady(function(){
2         // expanders
3         Ext.getBody().on('click', function(e, t){
4                 t = Ext.get(t);
5                 e.stopEvent();
6
7                 var bd = t.next('div.expandable-body');
8                 bd.enableDisplayMode();
9                 var bdi = bd.first();
10                 var expanded = bd.isVisible();
11
12                 if(expanded){
13                         bd.hide();
14                 }else{
15                         bdi.hide();
16                         bd.show();
17                         bdi.slideIn('l', {duration:0.2, stopAnimation: true, easing:'easeOut'});
18                 }
19
20                 t.update(!expanded ? 'Hide details' : 'Show details');
21
22         }, null, {delegate:'a.expander'});
23 });