开发者

Change width of thumb of a slider dynamically in Sencha Touch

开发者 https://www.devze.com 2023-03-16 20:22 出处:网络
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开发者_St

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

精彩评论

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