Zvi Band Relationships are our most important asset.

Toggling Between Values in jQuery

T

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]

Add comment

By Zvi
Zvi Band Relationships are our most important asset.

Zvi Band

Founder of Contactually.
I'm also passionate about growing the DC startup community, and I've founded Proudly Made in DC and the DC Tech Meetup.

Archives