I'm a Web Developer and Entrepreneur out of Washington DC.

Toggling Between Values in jQuery

Posted: July 27th, 2009 | Author: Zvi | Filed under: Development | No Comments »

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.

$("#element").toggleValue("true","false"); 


Leave a Reply