Is there a companion Ext JS Element.addClassOnOver?

In Ext JS, I see Element.addClassOnOver; Is there an easy way to "delete a class when it no longer works?"

+3
source share
3 answers

addClassOnOver does this automatically. Have you tried this? There is no need to manually remove the extra class.

+3
source

try the following:

var removeFn = function(e){
  if(!e.within(this.el, true)){
    Ext.fly(this, '_internal').removeClass(className);
  }
};

this.on('mouseout', removeFn, this.dom);

:

addClassOnOver

+1
source

In SuperBoxSelect, this is a bug.

To fix the SBS error, I simply changed:

this.el.addClassOnOver('x-superboxselect-item x-superboxselect-item-hover');

to:

this.el.addClassOnOver('x-superboxselect-item-hover');

This solves the problem very well, without the side effects that I could see.

0
source

All Articles