jquery - Remove background from radio button on unCheck -


Code and Demo:

I try to add a radio button in a green background Checkbox at / has been checked status

The checkbox works properly, but when a different radio button is checked, its background color is not removed. What am I missing here?

I know how to solve it ua bella giving a minute:)

This works perrfectly:

  $ (document) .ready (function () {$ ('input'). Change (function () {if ($ (children (' Input: No (checked) '); if (children, length = gt;) {$ (children) .each (function () {$ (this) .Parent (). RemoveClass (' greenBG ');} )} $ (This) .Parent (.) AddClass ('greenBG');}});});    

Comments