Jump to content

Recommended Posts

Posted

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

 

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...