Skip to content

Commit c98c4ed

Browse files
AurelioDeRosaRedWolves
authored andcommitted
events/event-helpers.md: Deleted example of the toggle() method removed in jQuery 1.9, as discussed in issue jquery#382.
fixes jquerygh-382 closes jquerygh-529
1 parent 917a5cf commit c98c4ed

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

page/events/event-helpers.md

-15
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,3 @@ $( "#menu li" ).hover(function() {
1919
$( this ).toggleClass( "hover" );
2020
});
2121
```
22-
23-
### `.toggle()`
24-
25-
<div class="warning">Note: This method signature was removed in jQuery 1.9. jQuery also provides an animation method named .toggle() that toggles the visibility of elements.</div>
26-
27-
The [`.toggle()`](http://api.jquery.com/toggle-event/) method is triggered by the "click" event and accepts two or more functions. Each time the click event occurs, the next function in the list is called. Generally, `.toggle()` is used with just two functions; however, it will accept an unlimited number of functions. Be careful, though: providing a long list of functions can be difficult to debug.
28-
29-
```
30-
// The toggle helper function
31-
$( "p.expander" ).toggle( function() {
32-
$( this ).prev().addClass( "open" );
33-
}, function() {
34-
$( this ).prev().removeClass( "open" );
35-
});
36-
```

0 commit comments

Comments
 (0)