mardi 28 mars 2017

Change color of checkbox field when checked

I have a check box field with box label colored in green. I need to change the color of the boxlabel (say: yellow) when a user checks the checkbox. i tried validating the checkbox, but it doesnt work. Any suggestions?

xtype :  'checkbox',
id: 'checkbox1',
name : 'checkbox',
style: 'background-color : #BCF5A9',
boxLabel: 'Mycheckbox'
//I tried the below handler function. but it doesnt work
handler: function (checkbox, checked) {
            if (checked) {
                style : 'background-color: #ddd';
            }
}




Aucun commentaire:

Enregistrer un commentaire