File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ $( "#other" ).on( "click", function() {
49
49
<desc >To trigger the blur event on all paragraphs:</desc >
50
50
<code ><![CDATA[
51
51
$( "p" ).trigger( "blur" );
52
- ]]> </code >
52
+ ]]> </code >
53
53
</example >
54
54
<category slug =" events/form-events" />
55
55
<category slug =" forms" />
Original file line number Diff line number Diff line change @@ -59,32 +59,32 @@ $( "#other" ).on( "click", function() {
59
59
span {
60
60
display: none;
61
61
}
62
- ]]> </css >
62
+ ]]> </css >
63
63
<code ><![CDATA[
64
64
$( "input" ).on( "focus", function() {
65
65
$( this ).next( "span" ).css( "display", "inline" ).fadeOut( 1000 );
66
66
} );
67
- ]]> </code >
67
+ ]]> </code >
68
68
<html ><![CDATA[
69
69
<p><input type="text"> <span>focus fire</span></p>
70
70
<p><input type="password"> <span>focus fire</span></p>
71
- ]]> </html >
71
+ ]]> </html >
72
72
</example >
73
73
<example >
74
74
<desc >To stop people from writing in text input boxes, try:</desc >
75
75
<code ><![CDATA[
76
76
$( "input[type=text]" ).on( "focus", function() {
77
77
$( this ).trigger( "blur" );
78
78
} );
79
- ]]> </code >
79
+ ]]> </code >
80
80
</example >
81
81
<example >
82
82
<desc >To focus on a login input box with id 'login' on page startup, try:</desc >
83
83
<code ><![CDATA[
84
84
$( function() {
85
85
$( "#login" ).trigger( "focus" );
86
86
} );
87
- ]]> </code >
87
+ ]]> </code >
88
88
</example >
89
89
<category slug =" events/form-events" />
90
90
<category slug =" forms" />
Original file line number Diff line number Diff line change 26
26
span {
27
27
display: none;
28
28
}
29
- ]]> </css >
29
+ ]]> </css >
30
30
<code ><![CDATA[
31
31
$( "p" ).on( "focusin", function() {
32
32
$( this ).find( "span" ).css( "display", "inline" ).fadeOut( 1000 );
33
33
} );
34
- ]]> </code >
34
+ ]]> </code >
35
35
<html ><![CDATA[
36
36
<p><input type="text"> <span>focusin fire</span></p>
37
37
<p><input type="password"> <span>focusin fire</span></p>
38
- ]]> </html >
38
+ ]]> </html >
39
39
</example >
40
40
<category slug =" events/form-events" />
41
41
<category slug =" forms" />
Original file line number Diff line number Diff line change 31
31
.inputs p {
32
32
margin-top: 0;
33
33
}
34
- ]]> </css >
34
+ ]]> </css >
35
35
<code ><![CDATA[
36
36
var focusout = 0,
37
37
blur = 0;
@@ -44,7 +44,7 @@ $( "p" )
44
44
blur++;
45
45
$( "#blur-count" ).text( "blur fired: " + blur + "x" );
46
46
} );
47
- ]]> </code >
47
+ ]]> </code >
48
48
<html ><![CDATA[
49
49
<div class="inputs">
50
50
<p>
@@ -57,7 +57,7 @@ $( "p" )
57
57
</div>
58
58
<div id="focus-count">focusout fire</div>
59
59
<div id="blur-count">blur fire</div>
60
- ]]> </html >
60
+ ]]> </html >
61
61
</example >
62
62
<category slug =" events/form-events" />
63
63
<category slug =" forms" />
You can’t perform that action at this time.
0 commit comments