0

I am trying to change jQuery slider's handle image on-the-fly.

Each client has his own handle image which is saved in corresponding client folder in my website. I want to change the slider's handle based on the client who is accessing the application.

For this, I have written a code inside the page's java script plug-in to change the class properties.

 $('.ui-slider-horizontal, .ui-slider-handle').css("background", "url(http://dev.mywebsite.com/Images/clients/SomeClientName/icon-slider.png)  no-repeat scroll 50% 50% !important;");

However, this does not seem to work. The code executes but the slider shows its own image.

If I browse above path, then I can see the image in browser.

If I write the same background property inside my master css file, then it works properly. But I want to achieve this at run time.

Anil Soman
  • 2,443
  • 7
  • 40
  • 64

1 Answers1

0

I was able to achieve it finally by setting the background property of link tag which is generated by slider dynamically inside a div. This is the div on which I call jquery.slider method to generate the slider control.

Anil Soman
  • 2,443
  • 7
  • 40
  • 64