[jQuery] Re: Blank input value testing

2008-12-21 Thread Kean
Well blank() was not created in jQuery. You can create a new function for jQuery like this. (function($){ $.fn.blank = function(){ return $.trim(this[0]).length == 0; } })(jQuery) input id=one value=sadf / input id=two value= / $('#one').blank(); // return false $('#two').blank();

[jQuery] Re: Blank input value testing

2008-12-21 Thread Lay András
Hello! On Sun, Dec 21, 2008 at 3:09 PM, Kean shenan...@gmail.com wrote: Well blank() was not created in jQuery. You can create a new function for jQuery like this. (function($){ $.fn.blank = function(){ return $.trim(this[0]).length == 0; } })(jQuery) input id=one value=sadf /

[jQuery] Re: Blank input value testing

2008-12-21 Thread Kean
My version plays nice if you have other libraries that take up the $ namespace (ie, prototype framework) On Dec 21, 7:50 am, Lay András lays...@gmail.com wrote: Hello! On Sun, Dec 21, 2008 at 3:09 PM, Kean shenan...@gmail.com wrote: Well blank() was not created in jQuery. You can