/* ============= ================================================== =================
File:jquery.hy.input.js
Desc: Extend some methods for input
Called by:
Auth : Big Weather
Date: 2009-10-30
================================== ==============================================
Change History
============================================== ==================================
Date: Author: Description:
---- ---- -------- -------------------
================ ================================================== ==============
Copyright (C) 1992-2009 Hongye Corporation
====================== ================================================== =========
*/
//Extended jQuery object method
jQuery.fn.extend({
/*============ ================================================== =============
Function description: Clear the text box when clicked
Calling method:
$(function(){ jQuery("#txt").txtClear( );} );
*/
txtClear:function(){
jQuery(this).click(function(){
jQuery(this).val('');
});
},
/*======================================== ======================================
Function description: Select all
Calling method:
Situation
Call
$("#chkBoxes input[type=checkbox]").check();
*/
check :function(){
return this.each(function(){this.checked=true;});
},
/*============== ================================================== ===========
Function description: Unselect
Calling method:
$("#chkBoxes input[type=checkbox]").uncheck();
* /
uncheck:function(){
return this.each(function(){this.checked=false;});
}
});