I'm trying to use the highlight effect from jQuery UI to show the user an explanation corresponding to some radio button choices. But the effect triggers twice, i.e. the relevant page component flashes twice instead of once.
I've had a look at similar questions, but they either have solutions that don't apply to my case or have a solution that doesn't work in my case. (Or the answers/comments ask for more details or an example which is never given.)
Here is a jsfiddle with a simplified version of my problem.
If you click on one of the radio buttons, the corresponding paragraph flashes green twice. As you can see from the JS section, the solution proposed in the second link above (using .off('click').on('click')
to prevent the "cloning" effect) doesn't seem to make a difference.
I'm using jQuery 1.8.0 and jQuery UI 1.8.22 (jsfiddle uses 1.7.2 and 1.8.18, respectively, and has the same issue) and the same thing happens on Opera, Chrome, and Firefox.
How can I work around this and have the effect only execute once? Happy to use a workaround if there is one...