[jQuery] Picking an element from a set
Sorry, I am sure this is a simple question but I cannot figure it
out. I have :
<div class="test">foo</div>
<div class="test">bar</div>
<div class="test">baz</div>
<div class="test">bif</div>
I have a selector:
$("div.test")[2].fadeOut();
This gives a console error:
Error: $("div.test")[2].fadeOut is not a function
From Jquery in Action I thought the wrapped set was an array that I
could access.
From - Mon Jan 4 11:14:32 2010
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Delivered-To: jeresig@gmail.com
Received: by 10.151.72.6 with SMTP id z6cs377485ybk;
Thu, 14 May 2009 15:40:07 -0700 (PDT)
Return-Path: <grbounce-638dHgUAAAC2EXkQqdh_tXLLLgHNcp8J=jeresig=gmail.com@googlegroups.com>
Received-SPF: pass (google.com: domain of grbounce-638dHgUAAAC2EXkQqdh_tXLLLgHNcp8J=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-638dHgUAAAC2EXkQqdh_tXLLLgHNcp8J=jeresig=gmail.com@googlegroups.com designates 10.224.19.196 as permitted sender) smtp.mail=grbounce-638dHgUAAAC2EXkQqdh_tXLLLgHNcp8J=jeresig=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-638dHgUAAAC2EXkQqdh_tXLLLgHNcp8J=jeresig=gmail.com@googlegroups.com
Received: from mr.google.com ([10.224.19.196])
by 10.224.19.196 with SMTP id c4mr3604543qab.18.1242340807269 (num_hops = 1);
Thu, 14 May 2009 15:40:07 -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:received:date:x-ip: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=B0++jllIKgx5hZ0CMiE9/CngFqx6MNSyGf8aPjSWPec=;
b=JiqqxZWIdd24P27MAsXqb39a+SjYxKg0tijmb4jLXospv1rzaTIVLkfEX4ZLadPMtD
9ciElMZgnk7mxsN0pgaEqR//ZcAQXHVw7RDTsCwFHLd/oBAIjTz73yMsaMVKbq4X4hEc
n7SnRTiDkApjcoupPJQqe261AgbOZpJ13ogYs=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=googlegroups.com; s=beta;
h=x-sender:x-apparently-to:mime-version:content-type:date:x-ip
: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=Y9EMYX+L94RoJxnKuUCnKhzIR4hXbGGg5gtml09xbDHb/HJTv6Nszc82lumiV1lAGU
KWCbVmm45JBpMhlHjFdRpcZrBanNfxSApnEF+J4aJg9W4FtFkZfPL1Ot1eTVfEqfiMBC
Mb+H7CX14PDtJHfYQe3HKwAzJ10DrZBiEu+AY=
Received: by 10.224.19.196 with SMTP id c4mr514361qab.18.1242340806923;
Thu, 14 May 2009 15:40:06 -0700 (PDT)
Received: by 10.230.2.2 with SMTP id 2gr13843vbh.0;
Thu, 14 May 2009 15:40:01 -0700 (PDT)
X-Sender: evictor@etek.chalmers.se
X-Apparently-To: jquery-ui@googlegroups.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Received: by 10.100.216.12 with SMTP id o12mr212572ang.5.1242335859435; Thu, 14 May 2009 14:17:39 -0700 (PDT)
Date: Thu, 14 May 2009 14:17:39 -0700 (PDT)
X-IP: 85.224.198.201
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Message-ID: <188a1f7a-52b2-4377-a2bb-3b7be932de4f@f16g2000vbf.googlegroups.com>
Subject: [jquery-ui] Dialog again...
From: SweVictor <evictor@etek.chalmers.se>
To: jQuery UI <jquery-ui@googlegroups.com>
X-Google-Approved: rdworth@gmail.com via web at 2009-05-14 22:40:01
Reply-To: jquery-ui@googlegroups.com
Sender: jquery-ui@googlegroups.com
Precedence: bulk
X-Google-Loop: groups
Mailing-List: list jquery-ui@googlegroups.com;
contact jquery-ui+owner@googlegroups.com
List-Id: <jquery-ui.googlegroups.com>
List-Post: <mailto:jquery-ui@googlegroups.com>
List-Help: <mailto:jquery-ui+help@googlegroups.com>
List-Unsubscribe: <http://googlegroups.com/group/jquery-ui/subscribe>,
<mailto:jquery-ui+unsubscribe@googlegroups.com>
X-BeenThere-Env: jquery-ui@googlegroups.com
X-BeenThere: jquery-ui@googlegroups.com
Hi again!
Just realized another thing... The modal part of the dialog does not
use position:fixed. As a result, if the page behind is changed to a
taller one while the modal box is open, the bottom part of the page
will not have the modal overlay. Just thought someone would like to
know.
/Victor