Jquery Toggle Event

.toggle()
.toggle( handler(eventObject), handler(eventObject) [, handler(eventObject)] )
handler(eventObject) A function to execute every even time the element is clicked.
handler(eventObject) A function to execute every odd time the element is clicked.
handler(eventObject) Additional handlers to cycle through after clicks.
<ul>
<li>lesson 8 jquery Events</li>
<li>Keydown Event, Keypress Event and Keyup Event</li>
<li>Focus, Focus In and Focus Out Events</li>
<li>Mouse Enter, Mouse Over and Mouse Leave Events</li>
</ul>
$("li").toggle(
      function () {
        $(this).css({"list-style-type":"disc", "color":"blue"});
      },
      function () {
        $(this).css({"list-style-type":"disc", "color":"red"});
      },
      function () {
        $(this).css({"list-style-type":"", "color":""});
      }
    );
Demo / Download
Jquery Toggle Event Jquery Toggle Event Reviewed by Bhaumik Patel on 7:19 AM Rating: 5