3 <script src='../dist/jquery.js' type='text/javascript'
></script>
19 <select class='select_test'
>
20 <option value='one'
>change me
1</option>
21 <option value='two'
>change me
2</option>
22 <option value='three'
>change me
3</option>
24 <select class='select_test'
>
25 <option value='one'
>change me
1</option>
26 <option value='two'
selected=
"selected">change me
2</option>
27 <option value='three'
>change me
3</option>
31 <select class='mselect_test'
multiple=
"multiple">
32 <option value='one'
>change me
1</option>
33 <option value='two'
>change me
2</option>
34 <option value='three'
>change me
3</option>
38 <input type=
"checkbox" class=
"checkbox_test" name=
"mycheckbox" id=
"checkbox1"/>
39 <label for=
"checkbox1">Checkbox
1</label><br/>
40 <input type=
"checkbox" class=
"checkbox_test" name=
"mycheckbox" id=
"checkbox2"/>
41 <label for=
"checkbox2">Checkbox
2</label><br />
42 <input type=
"checkbox" class=
"checkbox_test" name=
"mycheckbox" id=
"checkbox3" disabled=
"disabled"/>
43 <label for=
"checkbox3">Checkbox
3</label>
46 <button class=
"button_test" name=
"mybutton1" id=
"button1">Button
</button><br />
47 <button class=
"button_test" name=
"mybutton1" id=
"button1"><span>Button w/ child
</span></button><br />
48 <button class=
"button_test" name=
"mybutton1" id=
"button1" disabled=
"disabled">Button Disabled
</button><br />
49 <button class=
"button_test" name=
"mybutton1" id=
"button1" disabled=
"disabled"><span disabled=
"disabled">Button w/ child Dis.
</span></button><br />
52 <input type=
"radio" class=
"radio_test" name=
"myradio" id=
"radio1"/>
53 <label for=
"radio1">Radio1
</label><br/>
54 <input type=
"radio" class=
"radio_test" name=
"myradio" id=
"radio2"/>
55 <label for=
"radio2">Radio2
</label><br />
56 <input type=
"radio" class=
"radio_test" name=
"myradio" id=
"radio3" disabled=
"disabled"/>
57 <label for=
"radio3">Radio3
</label>
60 <input class=
"file_test" id=
"file1" type=
"file"/>
62 <input class='test' value='' id='input' size='
10'
/>
63 <input class='test' value='test' id='input2' size='
10'
readonly=
"readonly" />
66 <textarea rows='
2'
></textarea>
69 <td>$(document).bind('change')
<br />
70 $(document).bind('click')
75 <td id='select'
class=
"red">SELECT
</td>
76 <td id='mselect'
class=
"red">MULTI
</td>
77 <td id='checkbox'
class=
"red">CHECKBOX
</td>
78 <td id='button'
class=
"red">BUTTON
</td>
79 <td id='radio'
class=
"red">RADIO
</td>
80 <td id='file'
class=
"red">FILE
</td>
81 <td id='text'
class=
"red">TEXT
</td>
82 <td id='textarea'
class=
"red">TEXTAREA
</td>
83 <td id='boundChange'
class=
"red">DOCUMENT
</td>
87 <td id='selectbind'
class=
"red">SELECT
</td>
88 <td id='mselectbind'
class=
"red">MULTI
</td>
89 <td id='checkboxbind'
class=
"red">CHECKBOX
</td>
90 <td id='buttonbind'
class=
"red">BUTTON
</td>
91 <td id='radiobind'
class=
"red">RADIO
</td>
92 <td id='filebind'
class=
"red">FILE
</td>
93 <td id='textbind'
class=
"red">TEXT
</td>
94 <td id='textareabind'
class=
"red">TEXTAREA
</td>
98 <td id='selectfocus'
class=
"red">SELECT
</td>
99 <td id='mselectfocus'
class=
"red">MULTI
</td>
100 <td id='checkboxfocus'
class=
"red">CHECKBOX
</td>
101 <td id='buttonfocus'
class=
"red">BUTTON
</td>
102 <td id='radiofocus'
class=
"red">RADIO
</td>
103 <td id='filefocus'
class=
"red">FILE
</td>
104 <td id='textfocus'
class=
"red">TEXT
</td>
105 <td id='textareafocus'
class=
"red">TEXTAREA
</td>
106 <td id='boundFocus'
class=
"red">DOCUMENT
</td>
110 <td id='selectblur'
class=
"red">SELECT
</td>
111 <td id='mselectblur'
class=
"red">MULTI
</td>
112 <td id='checkboxblur'
class=
"red">CHECKBOX
</td>
113 <td id='buttonblur'
class=
"red">BUTTON
</td>
114 <td id='radioblur'
class=
"red">RADIO
</td>
115 <td id='fileblur'
class=
"red">FILE
</td>
116 <td id='textblur'
class=
"red">TEXT
</td>
117 <td id='textareablur'
class=
"red">TEXTAREA
</td>
118 <td id='boundBlur'
class=
"red">DOCUMENT
</td>
122 <td id='selectlfocus'
class=
"red">SELECT
</td>
123 <td id='mselectlfocus'
class=
"red">MULTI
</td>
124 <td id='checkboxlfocus'
class=
"red">CHECKBOX
</td>
125 <td id='buttonlfocus'
class=
"red">BUTTON
</td>
126 <td id='radiolfocus'
class=
"red">RADIO
</td>
127 <td id='filelfocus'
class=
"red">FILE
</td>
128 <td id='textlfocus'
class=
"red">TEXT
</td>
129 <td id='textarealfocus'
class=
"red">TEXTAREA
</td>
133 <td id='selectlblur'
class=
"red">SELECT
</td>
134 <td id='mselectlblur'
class=
"red">MULTI
</td>
135 <td id='checkboxlblur'
class=
"red">CHECKBOX
</td>
136 <td id='buttonlblur'
class=
"red">BUTTON
</td>
137 <td id='radiolblur'
class=
"red">RADIO
</td>
138 <td id='filelblur'
class=
"red">FILE
</td>
139 <td id='textlblur'
class=
"red">TEXT
</td>
140 <td id='textarealblur'
class=
"red">TEXTAREA
</td>
144 <td id='selectlclick'
class=
"red">SELECT
</td>
145 <td id='mselectlclick'
class=
"red">MULTI
</td>
146 <td id='checkboxlclick'
class=
"red">CHECKBOX
</td>
147 <td id='buttonlclick'
class=
"red">BUTTON
</td>
148 <td id='radiolclick'
class=
"red">RADIO
</td>
149 <td id='filelclick'
class=
"red">FILE
</td>
150 <td id='textlclick'
class=
"red">TEXT
</td>
151 <td id='textarealclick'
class=
"red">TEXTAREA
</td>
152 <td id='boundClick'
class=
"red">DOCUMENT
</td>
155 <h2>Submit Tests
</h2>
162 <form action=
"" id=
"text_submit">
163 <input class='test' type='text' value='Key Return To Submit'
/>
167 <form action=
"" id=
"password_submit">
168 <input class='test' type='password' value=''
/>
172 <form action=
"" id=
"submit_submit">
173 <input type='submit'
value=
"Click Me To Submit" />
176 <td>$(document).bind('submit')
</td>
180 <td id='textSubmit'
class=
"red">TEXT
</td>
181 <td id='passwordSubmit'
class=
"red">PASSWORD
</td>
182 <td id='submitSubmit'
class=
"red">BUTTON
</td>
183 <td id='boundSubmit'
class=
"red">DOCUMENT
</td>
189 <script type='text/javascript'
>
190 jQuery
.fn
.addChangeClickTest = function( id
, prevent
) {
191 this.bind("focusin", function(){
192 jQuery(id
+ "focus").blink();
193 }).bind("focusout", function(){
194 jQuery(id
+ "blur").blink();
197 this.bind("focus", function(){
198 jQuery(id
+ "lfocus").blink();
199 }).bind("blur", function(){
200 jQuery(id
+ "lblur").blink();
203 return this.bind("change", function(e
){
204 jQuery(id
+ "bind").blink();
205 }).live("change", function(e
){
211 }).live("click", function(e
){
212 jQuery(id
+ "lclick").blink();
217 jQuery
.fn
.addSubmitTest = function( id
, prevent
) {
218 return this.live("submit", function(e
){
227 jQuery
.fn
.blink = function(){
228 return this.css("backgroundColor","green").css("border","solid 3px green").delay(700).queue(function(next
){
229 jQuery(this).css("backgroundColor","");
234 $(document
).bind("focusin", function() {
235 jQuery("#boundFocus").blink();
238 $(document
).bind("focusout", function() {
239 jQuery("#boundBlur").blink();
242 $(document
).bind("click", function() {
243 jQuery("#boundClick").blink();
246 $("td.red").live("hover", function(e
) {
247 if ( e
.type
=== "mouseenter" ) {
248 $(this).css("backgroundColor","green");
250 $(this).css("backgroundColor","");
254 $(".select_test").addChangeClickTest("#select");
255 $(".mselect_test").addChangeClickTest("#mselect");
256 $(".checkbox_test").addChangeClickTest("#checkbox");
257 $(".radio_test").addChangeClickTest("#radio");
258 $(".file_test").addChangeClickTest("#file");
259 $('textarea').addChangeClickTest("#textarea");
260 $('#input').addChangeClickTest("#text");
261 $('button').addChangeClickTest("#button");
262 $(document
).bind("change", function(){
263 jQuery("#boundChange").blink();
266 $("#text_submit").addSubmitTest("#textSubmit", true);
267 $("#password_submit").addSubmitTest("#passwordSubmit", true);
268 $("#submit_submit").addSubmitTest("#submitSubmit", true);
269 $(document
).bind("submit", function(){
270 jQuery("#boundSubmit").blink();