[jQuery] Question: XPath User's New
I recently just picked up jQuery and am really astonished with it, but
I've found the selectors api a bit lacking because you cannot select
text nodes; that's not the end of the world as there are ways around
that in some situations. I've run into another road block, and if you
knowledgeable guys could spare some time to answer my question here
please do so. I have some experience with XPath, so hopefully some of
you people will have some experience with it as well as it'll form the
basis of my question.
Say I used an XPath query like so:
//div[@class='img'][count(img)>1]
From what I can read I'm able to do most of it up until the point
where I have to check to see if the child div has more than a single
image as jQuery doesn't have an equivalent of count. Is there a way to
select div elements with a class of 'img' that has more than one img
element as a child?
From - Mon Jan 4 11:15:52 2010
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Delivered-To: jeresig@gmail.com
Received: by 10.151.45.5 with SMTP id x5cs89653ybj;
Mon, 25 May 2009 00:44:03 -0700 (PDT)
Return-Path: <grbounce-W9CVLwUAAADIm2eLGouNme9m_gwtSg_s=jeresig=gmail.com@googlegroups.com>
Received-SPF: pass (google.com: domain of grbounce-W9CVLwUAAADIm2eLGouNme9m_gwtSg_s=jeresig=gmail.com@googlegroups.com designates 10.224.19.196 as permitted sender) client-ip=10.224.19.196;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-W9CVLwUAAADIm2eLGouNme9m_gwtSg_s=jeresig=gmail.com@googlegroups.com designates 10.224.19.196 as permitted sender) smtp.mail=grbounce-W9CVLwUAAADIm2eLGouNme9m_gwtSg_s=jeresig=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-W9CVLwUAAADIm2eLGouNme9m_gwtSg_s=jeresig=gmail.com@googlegroups.com
Received: from mr.google.com ([10.224.19.196])
by 10.224.19.196 with SMTP id c4mr9502931qab.18.1243237443594 (num_hops = 1);
Mon, 25 May 2009 00:44:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlegroups.com; s=beta;
h=domainkey-signature:received:received:x-sender:x-apparently-to
:mime-version:content-type:content-transfer-encoding:received:date
:in-reply-to:x-ip:references:user-agent:x-http-useragent:message-id
:subject:from:to:x-google-approved:reply-to:sender:precedence
:x-google-loop:mailing-list:list-id:list-post:list-help
:list-unsubscribe:x-beenthere-env:x-beenthere;
bh=sa5TjnY2cA4itVHXolZLA12GU+lM4CsgbbkpCU7y3Z8=;
b=ApT8OVV73YNMSej/UO+NgKbrlLOwGenhXHsJiSht59SXk3+ZD9VeMSmv5SD3pSAaxG
FN1Rfl3XcC25ZSG2KKNoVFvnQQW7q3fX86gWvbusDzi/gZXE55hOXspTIpw/91sIW3bi
N2HrudslIfdHjUzDvWUYLV2bf4YUDimpBdDr0=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=googlegroups.com; s=beta;
h=x-sender:x-apparently-to:mime-version:content-type
:content-transfer-encoding:date:in-reply-to:x-ip:references
:user-agent:x-http-useragent:message-id:subject:from:to
:x-google-approved:reply-to:sender:precedence:x-google-loop
:mailing-list:list-id:list-post:list-help:list-unsubscribe
:x-beenthere-env:x-beenthere;
b=aDiQZJh98kTDbNn6nD3HudgxabdhPa3IBoiMj9f5y9I7fsF5lGu1IQDz177YXXW99o
7f9XPHQJlnLujEI21EF/AbS3Bs3cisVwMPr5EKa4G7ITp4MHXLNmm6cmD3c06p78VPnD
DwMWbC0TTxal4nAatTz3XflSdfHJU29LJCFvk=
Received: by 10.224.19.196 with SMTP id c4mr1412787qab.18.1243237441605;
Mon, 25 May 2009 00:44:01 -0700 (PDT)
Received: by 10.230.14.144 with SMTP id g16gr107767vba.0;
Mon, 25 May 2009 00:43:58 -0700 (PDT)
X-Sender: michael.rubinstein@gmail.com
X-Apparently-To: jquery-en@googlegroups.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Received: by 10.100.33.15 with SMTP id g15mr388486ang.14.1243227742165; Sun, 24 May 2009 22:02:22 -0700 (PDT)
Date: Sun, 24 May 2009 22:02:22 -0700 (PDT)
In-Reply-To: <f97a0def-3e4b-4222-99da-61f89dcf215d@c18g2000prh.googlegroups.com>
X-IP: 98.210.232.149
References: <cb5c96c0-a5a0-426e-991d-c5c1b6a0f1fe@x29g2000prf.googlegroups.com> <165d45de-65a4-4e68-abfc-fd6b0f4838c1@f1g2000prb.googlegroups.com> <a3e60b65-6818-4293-8419-6a5c1a03912f@c18g2000prh.googlegroups.com> <a93b3b59-bdaa-48f6-bee6-a2a35af8d54b@n7g2000prc.googlegroups.com> <f97a0def-3e4b-4222-99da-61f89dcf215d@c18g2000prh.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.28 Safari/530.5,gzip(gfe),gzip(gfe)
Message-ID: <238f614e-5251-4e3a-9613-22c56414fd7c@w35g2000prg.googlegroups.com>
Subject: [jQuery] Re: jQuery(document).ready() Type error on WebKit based
Browsers
From: MichaelRuby <michael.rubinstein@gmail.com>
To: "jQuery (English)" <jquery-en@googlegroups.com>
X-Google-Approved: joern.zaefferer@googlemail.com via web at 2009-05-25 07:43:57
Reply-To: jquery-en@googlegroups.com
Sender: jquery-en@googlegroups.com
Precedence: bulk
X-Google-Loop: groups
Mailing-List: list jquery-en@googlegroups.com;
contact jquery-en+owner@googlegroups.com
List-Id: <jquery-en.googlegroups.com>
List-Post: <mailto:jquery-en@googlegroups.com>
List-Help: <mailto:jquery-en+help@googlegroups.com>
List-Unsubscribe: <http://googlegroups.com/group/jquery-en/subscribe>,
<mailto:jquery-en+unsubscribe@googlegroups.com>
X-BeenThere-Env: jquery-en@googlegroups.com
X-BeenThere: jquery-en@googlegroups.com
Can you send me a code example for ignoring the exceptions?
Thanks,
Michael