mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Convert test/delegatetest.html to use lf line endings.
This commit is contained in:
parent
866ba43d0a
commit
4190059c76
@ -1,242 +1,242 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src='../dist/jquery.js' type='text/javascript'></script>
|
<script src='../dist/jquery.js' type='text/javascript'></script>
|
||||||
<style>
|
<style>
|
||||||
.red {
|
.red {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
border: solid 3px red;
|
border: solid 3px red;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h2>Change Tests</h2>
|
<h2>Change Tests</h2>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Change each:
|
Change each:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select class='select_test'>
|
<select class='select_test'>
|
||||||
<option value='one'>change me 1</option>
|
<option value='one'>change me 1</option>
|
||||||
<option value='two'>change me 2</option>
|
<option value='two'>change me 2</option>
|
||||||
<option value='three'>change me 3</option>
|
<option value='three'>change me 3</option>
|
||||||
</select>
|
</select>
|
||||||
<select class='select_test'>
|
<select class='select_test'>
|
||||||
<option value='one'>change me 1</option>
|
<option value='one'>change me 1</option>
|
||||||
<option value='two' selected="selected">change me 2</option>
|
<option value='two' selected="selected">change me 2</option>
|
||||||
<option value='three'>change me 3</option>
|
<option value='three'>change me 3</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select class='mselect_test' multiple="multiple">
|
<select class='mselect_test' multiple="multiple">
|
||||||
<option value='one'>change me 1</option>
|
<option value='one'>change me 1</option>
|
||||||
<option value='two'>change me 2</option>
|
<option value='two'>change me 2</option>
|
||||||
<option value='three'>change me 3</option>
|
<option value='three'>change me 3</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" class="checkbox_test" name="mycheckbox" id="checkbox1"/>
|
<input type="checkbox" class="checkbox_test" name="mycheckbox" id="checkbox1"/>
|
||||||
<label for="checkbox1">Checkbox 1</label><br/>
|
<label for="checkbox1">Checkbox 1</label><br/>
|
||||||
<input type="checkbox" class="checkbox_test" name="mycheckbox" id="checkbox2"/>
|
<input type="checkbox" class="checkbox_test" name="mycheckbox" id="checkbox2"/>
|
||||||
<label for="checkbox2">Checkbox 2</label>
|
<label for="checkbox2">Checkbox 2</label>
|
||||||
<input type="checkbox" class="checkbox_test" name="mycheckbox" id="checkbox3" disabled="disabled"/>
|
<input type="checkbox" class="checkbox_test" name="mycheckbox" id="checkbox3" disabled="disabled"/>
|
||||||
<label for="checkbox3">Checkbox 3</label>
|
<label for="checkbox3">Checkbox 3</label>
|
||||||
</td>
|
</td>
|
||||||
</td>
|
</td>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" class="radio_test" name="myradio" id="radio1"/>
|
<input type="radio" class="radio_test" name="myradio" id="radio1"/>
|
||||||
<label for="radio1">Radio1</label><br/>
|
<label for="radio1">Radio1</label><br/>
|
||||||
<input type="radio" class="radio_test" name="myradio" id="radio2"/>
|
<input type="radio" class="radio_test" name="myradio" id="radio2"/>
|
||||||
<label for="radio2">Radio2</label>
|
<label for="radio2">Radio2</label>
|
||||||
<input type="radio" class="radio_test" name="myradio" id="radio3" disabled="disabled"/>
|
<input type="radio" class="radio_test" name="myradio" id="radio3" disabled="disabled"/>
|
||||||
<label for="radio3">Radio3</label>
|
<label for="radio3">Radio3</label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class="file_test" id="file1" type="file"/>
|
<input class="file_test" id="file1" type="file"/>
|
||||||
<td>
|
<td>
|
||||||
<input class='test' value='' id='input' size='10' />
|
<input class='test' value='' id='input' size='10' />
|
||||||
<input class='test' value='test' id='input2' size='10' readonly="readonly" />
|
<input class='test' value='test' id='input2' size='10' readonly="readonly" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<textarea rows='2'></textarea>
|
<textarea rows='2'></textarea>
|
||||||
</td>
|
</td>
|
||||||
<td>$(document).bind('change')</td>
|
<td>$(document).bind('change')</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Live:</td>
|
<td>Live:</td>
|
||||||
<td id='select' class="red">SELECT</td>
|
<td id='select' class="red">SELECT</td>
|
||||||
<td id='mselect' class="red">MULTI</td>
|
<td id='mselect' class="red">MULTI</td>
|
||||||
<td id='checkbox' class="red">CHECKBOX</td>
|
<td id='checkbox' class="red">CHECKBOX</td>
|
||||||
<td id='radio' class="red">RADIO</td>
|
<td id='radio' class="red">RADIO</td>
|
||||||
<td id='file' class="red">FILE</td>
|
<td id='file' class="red">FILE</td>
|
||||||
<td id='text' class="red">TEXT</td>
|
<td id='text' class="red">TEXT</td>
|
||||||
<td id='textarea' class="red">TEXTAREA</td>
|
<td id='textarea' class="red">TEXTAREA</td>
|
||||||
<td id='boundChange' class="red">DOCUMENT</td>
|
<td id='boundChange' class="red">DOCUMENT</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Bind:</td>
|
<td>Bind:</td>
|
||||||
<td id='selectbind' class="red">SELECT</td>
|
<td id='selectbind' class="red">SELECT</td>
|
||||||
<td id='mselectbind' class="red">MULTI</td>
|
<td id='mselectbind' class="red">MULTI</td>
|
||||||
<td id='checkboxbind' class="red">CHECKBOX</td>
|
<td id='checkboxbind' class="red">CHECKBOX</td>
|
||||||
<td id='radiobind' class="red">RADIO</td>
|
<td id='radiobind' class="red">RADIO</td>
|
||||||
<td id='filebind' class="red">FILE</td>
|
<td id='filebind' class="red">FILE</td>
|
||||||
<td id='textbind' class="red">TEXT</td>
|
<td id='textbind' class="red">TEXT</td>
|
||||||
<td id='textareabind' class="red">TEXTAREA</td>
|
<td id='textareabind' class="red">TEXTAREA</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Focusin:</td>
|
<td>Focusin:</td>
|
||||||
<td id='selectfocus' class="red">SELECT</td>
|
<td id='selectfocus' class="red">SELECT</td>
|
||||||
<td id='mselectfocus' class="red">MULTI</td>
|
<td id='mselectfocus' class="red">MULTI</td>
|
||||||
<td id='checkboxfocus' class="red">CHECKBOX</td>
|
<td id='checkboxfocus' class="red">CHECKBOX</td>
|
||||||
<td id='radiofocus' class="red">RADIO</td>
|
<td id='radiofocus' class="red">RADIO</td>
|
||||||
<td id='filefocus' class="red">FILE</td>
|
<td id='filefocus' class="red">FILE</td>
|
||||||
<td id='textfocus' class="red">TEXT</td>
|
<td id='textfocus' class="red">TEXT</td>
|
||||||
<td id='textareafocus' class="red">TEXTAREA</td>
|
<td id='textareafocus' class="red">TEXTAREA</td>
|
||||||
<td id='boundFocus' class="red">DOCUMENT</td>
|
<td id='boundFocus' class="red">DOCUMENT</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Focusout:</td>
|
<td>Focusout:</td>
|
||||||
<td id='selectblur' class="red">SELECT</td>
|
<td id='selectblur' class="red">SELECT</td>
|
||||||
<td id='mselectblur' class="red">MULTI</td>
|
<td id='mselectblur' class="red">MULTI</td>
|
||||||
<td id='checkboxblur' class="red">CHECKBOX</td>
|
<td id='checkboxblur' class="red">CHECKBOX</td>
|
||||||
<td id='radioblur' class="red">RADIO</td>
|
<td id='radioblur' class="red">RADIO</td>
|
||||||
<td id='fileblur' class="red">FILE</td>
|
<td id='fileblur' class="red">FILE</td>
|
||||||
<td id='textblur' class="red">TEXT</td>
|
<td id='textblur' class="red">TEXT</td>
|
||||||
<td id='textareablur' class="red">TEXTAREA</td>
|
<td id='textareablur' class="red">TEXTAREA</td>
|
||||||
<td id='boundBlur' class="red">DOCUMENT</td>
|
<td id='boundBlur' class="red">DOCUMENT</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Live Focus:</td>
|
<td>Live Focus:</td>
|
||||||
<td id='selectlfocus' class="red">SELECT</td>
|
<td id='selectlfocus' class="red">SELECT</td>
|
||||||
<td id='mselectlfocus' class="red">MULTI</td>
|
<td id='mselectlfocus' class="red">MULTI</td>
|
||||||
<td id='checkboxlfocus' class="red">CHECKBOX</td>
|
<td id='checkboxlfocus' class="red">CHECKBOX</td>
|
||||||
<td id='radiolfocus' class="red">RADIO</td>
|
<td id='radiolfocus' class="red">RADIO</td>
|
||||||
<td id='filelfocus' class="red">FILE</td>
|
<td id='filelfocus' class="red">FILE</td>
|
||||||
<td id='textlfocus' class="red">TEXT</td>
|
<td id='textlfocus' class="red">TEXT</td>
|
||||||
<td id='textarealfocus' class="red">TEXTAREA</td>
|
<td id='textarealfocus' class="red">TEXTAREA</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Live Blur:</td>
|
<td>Live Blur:</td>
|
||||||
<td id='selectlblur' class="red">SELECT</td>
|
<td id='selectlblur' class="red">SELECT</td>
|
||||||
<td id='mselectlblur' class="red">MULTI</td>
|
<td id='mselectlblur' class="red">MULTI</td>
|
||||||
<td id='checkboxlblur' class="red">CHECKBOX</td>
|
<td id='checkboxlblur' class="red">CHECKBOX</td>
|
||||||
<td id='radiolblur' class="red">RADIO</td>
|
<td id='radiolblur' class="red">RADIO</td>
|
||||||
<td id='filelblur' class="red">FILE</td>
|
<td id='filelblur' class="red">FILE</td>
|
||||||
<td id='textlblur' class="red">TEXT</td>
|
<td id='textlblur' class="red">TEXT</td>
|
||||||
<td id='textarealblur' class="red">TEXTAREA</td>
|
<td id='textarealblur' class="red">TEXTAREA</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h2>Submit Tests</h2>
|
<h2>Submit Tests</h2>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Submit each:
|
Submit each:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<form action="" id="text_submit">
|
<form action="" id="text_submit">
|
||||||
<input class='test' type='text' value='Key Return To Submit'/>
|
<input class='test' type='text' value='Key Return To Submit'/>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<form action="" id="password_submit">
|
<form action="" id="password_submit">
|
||||||
<input class='test' type='password' value=''/>
|
<input class='test' type='password' value=''/>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<form action="" id="submit_submit">
|
<form action="" id="submit_submit">
|
||||||
<input type='submit' value="Click Me To Submit" />
|
<input type='submit' value="Click Me To Submit" />
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td>$(document).bind('submit')</td>
|
<td>$(document).bind('submit')</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Results:</td>
|
<td>Results:</td>
|
||||||
<td id='textSubmit' class="red">TEXT</td>
|
<td id='textSubmit' class="red">TEXT</td>
|
||||||
<td id='passwordSubmit' class="red">PASSWORD</td>
|
<td id='passwordSubmit' class="red">PASSWORD</td>
|
||||||
<td id='submitSubmit' class="red">BUTTON</td>
|
<td id='submitSubmit' class="red">BUTTON</td>
|
||||||
<td id='boundSubmit' class="red">DOCUMENT</td>
|
<td id='boundSubmit' class="red">DOCUMENT</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul id="log"></ul>
|
<ul id="log"></ul>
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
jQuery.fn.addChangeTest = function( id, prevent ) {
|
jQuery.fn.addChangeTest = function( id, prevent ) {
|
||||||
this.bind("focusin", function(){
|
this.bind("focusin", function(){
|
||||||
jQuery(id + "focus").blink();
|
jQuery(id + "focus").blink();
|
||||||
}).bind("focusout", function(){
|
}).bind("focusout", function(){
|
||||||
jQuery(id + "blur").blink();
|
jQuery(id + "blur").blink();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.bind("focus", function(){
|
this.bind("focus", function(){
|
||||||
jQuery(id + "lfocus").blink();
|
jQuery(id + "lfocus").blink();
|
||||||
}).bind("blur", function(){
|
}).bind("blur", function(){
|
||||||
jQuery(id + "lblur").blink();
|
jQuery(id + "lblur").blink();
|
||||||
});
|
});
|
||||||
|
|
||||||
return this.bind("change", function(e){
|
return this.bind("change", function(e){
|
||||||
jQuery(id + "bind").blink();
|
jQuery(id + "bind").blink();
|
||||||
}).live("change", function(e){
|
}).live("change", function(e){
|
||||||
if ( prevent ) {
|
if ( prevent ) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(id).blink();
|
jQuery(id).blink();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.fn.addSubmitTest = function( id, prevent ) {
|
jQuery.fn.addSubmitTest = function( id, prevent ) {
|
||||||
return this.live("submit", function(e){
|
return this.live("submit", function(e){
|
||||||
if ( prevent ) {
|
if ( prevent ) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(id).blink();
|
jQuery(id).blink();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.fn.blink = function(){
|
jQuery.fn.blink = function(){
|
||||||
return this.css("backgroundColor","green").css("border","solid 3px green").delay(700).queue(function(next){
|
return this.css("backgroundColor","green").css("border","solid 3px green").delay(700).queue(function(next){
|
||||||
jQuery(this).css("backgroundColor","");
|
jQuery(this).css("backgroundColor","");
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).bind("focusin", function() {
|
$(document).bind("focusin", function() {
|
||||||
jQuery("#boundFocus").blink();
|
jQuery("#boundFocus").blink();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).bind("focusout", function() {
|
$(document).bind("focusout", function() {
|
||||||
jQuery("#boundBlur").blink();
|
jQuery("#boundBlur").blink();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("td.red").live("hover", function(e) {
|
$("td.red").live("hover", function(e) {
|
||||||
if ( e.type === "mouseenter" ) {
|
if ( e.type === "mouseenter" ) {
|
||||||
$(this).css("backgroundColor","green");
|
$(this).css("backgroundColor","green");
|
||||||
} else {
|
} else {
|
||||||
$(this).css("backgroundColor","");
|
$(this).css("backgroundColor","");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".select_test").addChangeTest("#select");
|
$(".select_test").addChangeTest("#select");
|
||||||
$(".mselect_test").addChangeTest("#mselect");
|
$(".mselect_test").addChangeTest("#mselect");
|
||||||
$(".checkbox_test").addChangeTest("#checkbox");
|
$(".checkbox_test").addChangeTest("#checkbox");
|
||||||
$(".radio_test").addChangeTest("#radio");
|
$(".radio_test").addChangeTest("#radio");
|
||||||
$(".file_test").addChangeTest("#file");
|
$(".file_test").addChangeTest("#file");
|
||||||
$('textarea').addChangeTest("#textarea");
|
$('textarea').addChangeTest("#textarea");
|
||||||
$('#input').addChangeTest("#text");
|
$('#input').addChangeTest("#text");
|
||||||
$(document).bind("change", function(){
|
$(document).bind("change", function(){
|
||||||
jQuery("#boundChange").blink();
|
jQuery("#boundChange").blink();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#text_submit").addSubmitTest("#textSubmit", true);
|
$("#text_submit").addSubmitTest("#textSubmit", true);
|
||||||
$("#password_submit").addSubmitTest("#passwordSubmit", true);
|
$("#password_submit").addSubmitTest("#passwordSubmit", true);
|
||||||
$("#submit_submit").addSubmitTest("#submitSubmit", true);
|
$("#submit_submit").addSubmitTest("#submitSubmit", true);
|
||||||
$(document).bind("submit", function(){
|
$(document).bind("submit", function(){
|
||||||
jQuery("#boundSubmit").blink();
|
jQuery("#boundSubmit").blink();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user