On Sat, Dec 6, 2008 at 5:26 PM, Yuvraj Mathur <[EMAIL PROTECTED]> wrote:
>
> Not sure but should be like this:
> if($(#'text').val(''));
Actually, this would *set* the value to '' and would always evaluate to
true, because it returns the jQuery object for chaining (if you don't supply
an arg to
Not sure but should be like this:
if($(#'text').val(''));
Try up this and let me know if it works.
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Costaud
Sent: Sunday, December 07, 2008 3:43 AM
To: jQuery (English)
Subject: [jQuery] if ($("#fiel
Karl's suggestion is how I always do it...simplest IMO.
On Dec 6, 8:19 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Sure, that's fine. You could also do this:
>
> if (!$('#text').val())
>
> --Karl
>
>
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Dec 6, 2008, at
Sure, that's fine. You could also do this:
if (!$('#text').val())
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Dec 6, 2008, at 5:12 PM, Costaud wrote:
Hello,
I'm wondering if this is the correct way of checking whether the
textbox is empty or not:
i
Whoops, that matches "has no children". I think what you did is fine.
--Erik
On Sat, Dec 6, 2008 at 3:56 PM, Costaud <[EMAIL PROTECTED]> wrote:
>
> That is always saying the field is empty.
>
> On Dec 6, 5:24 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> > Maybe try:
> > if($('#text').is(':empt
That is always saying the field is empty.
On Dec 6, 5:24 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> Maybe try:
> if($('#text').is(':empty'))
>
> --Erik
>
> On Sat, Dec 6, 2008 at 2:12 PM, Costaud <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I'm wondering if this is the correct way of checkin
Maybe try:
if($('#text').is(':empty'))
--Erik
On Sat, Dec 6, 2008 at 2:12 PM, Costaud <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm wondering if this is the correct way of checking whether the
> textbox is empty or not:
>
> if ($("#text").val() == '')
>
> Thanks.
7 matches
Mail list logo