erich.wanker Posted November 30, 2015 Posted November 30, 2015 hy .. i use a UniTrackBar as button ;-) possible values are 0/1 with css - i start the tracker with my settings.. .x-slider-horz .x-slider-thumb { width: 25px; height: 25px; ; margin-top: -4px; background-image: url(bullet.png); } but i can not change the Background image onClick... i like a red Bullet if the slider is on possition 0 - and a green buttet for position 1 i tryed something like this: function change(slider, newValue, thumb, eOpts) { if (newValue = 0) { slider.setStyle('background-image', "url(/files/css/bullet_r.png)"); if (newValue = 1) { slider.setStyle('background-image', "url(/files/css/bullet.png)"); } but doesn´t work .. Any Idea? ThanX Quote
Sherzod Posted November 30, 2015 Posted November 30, 2015 Hi Erich, Try: function change(slider, newValue, thumb, eOpts) { if (newValue == 0) { slider.el.setStyle('background-image', "url(/files/css/bullet_r.png)"); if (newValue == 1) { slider.el.setStyle('background-image', "url(/files/css/bullet.png)"); } Best regards. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.