File tree 4 files changed +8
-8
lines changed
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ $( ".hello" ).empty();
31
31
<example >
32
32
<desc >Removes all child nodes (including text nodes) from all paragraphs</desc >
33
33
<code ><![CDATA[
34
- $( "button" ).click( function() {
34
+ $( "button" ).on( "click", function() {
35
35
$( "p" ).empty();
36
- });
36
+ } );
37
37
]]> </code >
38
38
<css ><![CDATA[
39
39
p {
Original file line number Diff line number Diff line change @@ -135,9 +135,9 @@ $.fn.equalizeHeights = function() {
135
135
return this.height( Math.max.apply( this, maxHeight ) );
136
136
};
137
137
138
- $( "input" ).click( function() {
138
+ $( "input" ).on( "click", function() {
139
139
$( "div" ).equalizeHeights();
140
- });
140
+ } );
141
141
]]> </code >
142
142
<css ><![CDATA[
143
143
div {
Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ $( "div" ).remove( ".hello" );
42
42
<example >
43
43
<desc >Removes all paragraphs from the DOM</desc >
44
44
<code ><![CDATA[
45
- $( "button" ).click( function() {
45
+ $( "button" ).on( "click", function() {
46
46
$( "p" ).remove();
47
- });
47
+ } );
48
48
]]> </code >
49
49
<css ><![CDATA[
50
50
p {
Original file line number Diff line number Diff line change @@ -92,9 +92,9 @@ if ( display === true ) {
92
92
<example >
93
93
<desc >Toggles all paragraphs.</desc >
94
94
<code ><![CDATA[
95
- $( "button" ).click( function() {
95
+ $( "button" ).on( "click", function() {
96
96
$( "p" ).toggle();
97
- });
97
+ } );
98
98
]]> </code >
99
99
<html ><![CDATA[
100
100
<button>Toggle</button>
You can’t perform that action at this time.
0 commit comments