Ankur Verma
Ankur Verma

Reputation: 5933

Changing color in Switchify Api of Jquery

I am working with the switchify api of jquery found here....Link

I am successfully implemented the code but I have just one concern where can I change the background color of on and off positions. As here you can see the on position is green and off position is in white color(some shade of white :) ).I want to change the color of the off position to green, red , blue or anything..Please shed some light...

enter image description here

Upvotes: 1

Views: 279

Answers (2)

rajesh kakawat
rajesh kakawat

Reputation: 10896

you have css file name jquery.switch.css their you can edit and specify your color you want like this

.ui-switch-on{
   background: green;
   border-bottom-right-radius: 0;
   border-color: #006600;
   border-right: medium none #006600;
   border-top-right-radius: 0;
   padding-right: 20px;
}
.ui-switch-off{
   background:yellow;
   border-bottom-left-radius: 0;
   border-color: #660000;
   border-left: medium none #660000;
   border-top-left-radius: 0;
   padding-left: 20px;
}

Upvotes: 2

sandeep
sandeep

Reputation: 92813

Check with firebug there are two classes .ui-switch-on & .ui-switch-off on it. Just override with your styling. For example write like this:

.ui-switch-on{
    background:red !important;
}
.ui-switch-off{
    background:yellow !important;
}

Upvotes: 1

Related Questions