开发者

Change width of thumb of a slider dynamically in Sencha Touch

I need to change the width of a thumb of a slider dynamically. Sencha's CSS is not letting me. Only if I call .x-thumb::before in my CSS I can set it there, but I need to do it in my Javascr开发者_StackOverflow社区ipt code since the width will vary depending on the number of elements I need to slide.

I have tried changing the width in the DOM but nothing happens, it seems that the property gets overwritten by Sencha's CSS.

Any help is greatly appreciated.


You may want to try setting the 'style' attribute of the DOM element.

Ext.select('#my-element-id').elements[0].style.width = '100px'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜