PDA

View Full Version : css style used when hovering over a buttom



machetico
24 Feb 2016, 12:25 PM
I have a dynamic menu that has several buttons. When a button is clicked I would like the button to change its appearance like when hovering over it(sort of highlighting the button). It should stay that way until I decided to reset it. How could I achieve it. I have used
button.btnInnerEl.setStyle(?) or button.addCls but how not figure it out the class or css style I should use.
I tried this(got it from extjs css resources) on Chrome but is not good enough.
button.btnInnerEl.setStyle( {"border-color": "#b0ccf2"});
button.btnInnerEl.setStyle( {"background-image": "none"});
button.btnInnerEl.setStyle( {"background-color": "#e4f3ff"});
button.btnInnerEl.setStyle( {"background-image": "-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e4f3ff), color-stop(48%, #d9edff), color-stop(52%, #c2d8f2), color-stop(100%, #c6dcf6))"});
button.btnInnerEl.setStyle( {"background-image": "-webkit-linear-gradient(top, #e4f3ff, #d9edff 48%, #c2d8f2 52%, #c6dcf6)"});
Thanks for your help

jdkhamba
27 Feb 2016, 10:51 PM
You are probably looking for overCls config:

http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.menu.Item-cfg-overCls