SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot 8Observer8's Avatar
    Join Date
    Jul 2013
    Location
    Russia
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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!

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,941
    Mentioned
    215 Post(s)
    Tagged
    12 Thread(s)
    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

  3. #3
    SitePoint Zealot 8Observer8's Avatar
    Join Date
    Jul 2013
    Location
    Russia
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •