🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #50523

Re: Problem z next i prev

#50523
From: Tomek Kańka
Date: Thu, 27 Jan 2011 21:36
28 lines
1608 bytes
maYk <m.gawrychowski@gmail.com> napisał(a)
> On Jan 26, 4:25 pm, maYk <m.gawrychow...@gmail.com> wrote:
>
>
> To moze zeby jeszcze bylo prosciej:
>
> $.each($(".dropdown"), function(i,v) {
> var next = $(this).next('input');
> var prev = $(this).prev('select');
> alert(prev.val());
>         if ((prev.val() == 15) && (v.name == 'quantity[]')){
>                   alert("LALALA");
>         }
> });
>
> Wszystkie elementy formularza posiadaja klase .dropdown. Kiedy each
> najedzie na input ktorynazywa sie quantity[] chcialbym poznac wartosc
> wybranego selecta ktory znajduje sie 2 inputy przed quantity.
>

A tam nie powinno być 

var prev = v.prev('select')?

Ale ja prawie nie znam jQuery.

-- 
Tomek
Technical Details
Message-ID: <slrnik3pbf.q2a.tom@tv2.dom.local>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <758c6d53-1d0d-41df-908b-45c4df9b11a2@i32g2000pri.googlegroups.com> <5da78288-2314-4890-8f17-c13a5e759fef@8g2000prb.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: Tomek Kańka <tom@tomkan.eu.org>
Newsgroups: pl.comp.lang.javascript
Subject: Re: Problem z next i prev
Date: Thu, 27 Jan 2011 21:36:47 +0000 (UTC)
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 29
Message-ID: <slrnik3pbf.q2a.tom@tv2.dom.local>
References: <758c6d53-1d0d-41df-908b-45c4df9b11a2@i32g2000pri.googlegroups.com> <5da78288-2314-4890-8f17-c13a5e759fef@8g2000prb.googlegroups.com>
NNTP-Posting-Host: host-80-238-125-99.jmdi.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1296164207 19932 80.238.125.99 (27 Jan 2011 21:36:47 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Thu, 27 Jan 2011 21:36:47 +0000 (UTC)
X-User: tomek.kanka
User-Agent: slrn/0.9.9p1 (Linux)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit