I have a jQuery UI toggle button. When the button is clicked, I want to set the inside square to an arbitrary color. Here is jsFiddle that show the issue.
When the button is clicked, I expect the black rectangle to become red, but, for some reasons, it stays black.
Thanks for your help.
You can do this:
So now you can use this id instead of the variable:
Check it here: http://jsfiddle.net/JpECU/1/