🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Argument funkcji

#51823
From: Borys Pogoreło
Date: Thu, 01 Mar 2018 22:40
27 lines
2177 bytes
Dnia Thu, 1 Mar 2018 14:03:13 -0800 (PST), zpksoft napisał(a):

>> Przykład. Tutaj wiersz datagrida.
> 
> Jeżeli pewien wiersz jest identyfikowany przez ciąg 'tr.row' ta jak jest identyfikowany kolejny?

Bierzesz sobie e.target i robisz z tym, co tylko chcesz. Np.
e.target.nextSibling, tudzież $(e.target).next() czy jak tam komu wygodnie.

>> Przy kodowaniu identyfikatorów na twardo jak najbardziej. Reszta świata
>> odpina stary nadrzędny event listener i podpina nowy.
> 
> Po co podpinać nowy? Kupa roboty i kodu. I nie zasłaniaj się resztą świata. Pisz za siebie.

datagrid.removeEventListener('click', staryhandler);
datagrid.addEventListener('click', nowyhandler);

No fakt, kupa roboty i kodu.

> Nie zrozumiałeś pytania. 

Widocznie źle je zadałeś. Co chcesz analizować i w czym przeszkadza, że
zniknęło?

-- 
Borys Pogoreło
borys(#)leszno,edu,pl
Technical Details
Message-ID: <11hsdnx36lvz3.sjxote5c1628.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.promontel.net.pl!not-for-mail
References: <5a8d1d93$0$674$65785112@news.neostrada.pl> <5a8d2dc0$0$582$65785112@news.neostrada.pl> <b7c28b16-9101-4f3f-841e-3255717e3017@googlegroups.com> <148vihvftubia.1e9gxiae9fy4p.dlg@40tude.net> <e4b021b8-9de9-450b-a7b8-7cbf450f6719@googlegroups.com> <1qn3p672u6yl5.1585lwp0arhbr.dlg@40tude.net> <1b368637-7199-4b74-85d2-5a359e6666e0@googlegroups.com> <15dvc5ead1h2c.cg8ko59kdlzt$.dlg@40tude.net> <246a73c9-8dc7-4ee0-946e-885933c13103@googlegroups.com> <27t8tt1m96wu.11hqw4vglcdjq.dlg@40tude.net> <d4de74d5-ae29-4205-acd7-096434f0e227@googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.promontel.net.pl!not-for-mail
From: Borys Pogoreło <borys@pl.edu.leszno>
Newsgroups: pl.comp.lang.javascript
Subject: Re: Argument funkcji
Date: Thu, 1 Mar 2018 23:40:48 +0100
Organization: snafu
Lines: 27
Message-ID: <11hsdnx36lvz3.sjxote5c1628.dlg@40tude.net>
References: <5a8d1d93$0$674$65785112@news.neostrada.pl> <5a8d2dc0$0$582$65785112@news.neostrada.pl> <b7c28b16-9101-4f3f-841e-3255717e3017@googlegroups.com> <148vihvftubia.1e9gxiae9fy4p.dlg@40tude.net> <e4b021b8-9de9-450b-a7b8-7cbf450f6719@googlegroups.com> <1qn3p672u6yl5.1585lwp0arhbr.dlg@40tude.net> <1b368637-7199-4b74-85d2-5a359e6666e0@googlegroups.com> <15dvc5ead1h2c.cg8ko59kdlzt$.dlg@40tude.net> <246a73c9-8dc7-4ee0-946e-885933c13103@googlegroups.com> <27t8tt1m96wu.11hqw4vglcdjq.dlg@40tude.net> <d4de74d5-ae29-4205-acd7-096434f0e227@googlegroups.com>
NNTP-Posting-Host: 37.47.138.148
Mime-Version: 1.0
X-Trace: thunar.promontel.net.pl 1519943857 7241 37.47.138.148 (1 Mar 2018 22:37:37 GMT)
X-Complaints-To: abuse@promontel.net.pl
NNTP-Posting-Date: Thu, 1 Mar 2018 22:37:37 +0000 (UTC)
User-Agent: 40tude_Dialog/2.0.14.1pl
X-fnord: obey.
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit