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" wrote:
> Hello!
>
>
>
> On Sun, Dec 21, 2008 at 3:09 PM, Kean wrote:
> > Well blank() was not created in jQuery.
>
> > You can create a new function for jQue
Hello!
On Sun, Dec 21, 2008 at 3:09 PM, Kean 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)
>
>
>
>
> $('#one').blank(); // return
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)
$('#one').blank(); // return false
$('#two').blank(); // return true
haven't tested the code but should
3 matches
Mail list logo