How does work a "toggle" function?

Hi,

I want to change “Yes” and “No” on the <div> by clicking on the <a>: http://jsfiddle.net/8Observer8/3wCkc/

Thank you!

Hi,

You can do it like this: http://jsfiddle.net/hibbard_eu/E32qM/

With no parameters, the .toggle() method simply toggles the visibility of elements.

There also used to be an event handler named .toggle(). This was deprecated in jQuery 1.8 and removed in jQuery 1.9

Thank you very much :slight_smile: