I had a need for switching back and forth between two different values in a hidden input field. I couldn’t find any decent plugins to achieve this, so I wrote a little jQuery plugin to handle this.
Download here. Using it is dead simple, just pass in the two values you want to toggle between.
[javascript]$("#element").toggleValue("true","false"); [/javascript]
Toggling Between Values in jQuery
T