Simple correction, I meant the first child of it's parent*. Just in case it
wasn't clear.

Cheers-
Nic
http://www.twitter.com/nicluciano

On Sat, Jan 17, 2009 at 2:05 PM, Nic Luciano <nic.luci...@gmail.com> wrote:

> The reason it's not working is you're using the first-child selector. What
> you're doing by using that is selecting every anchor that is the first
> parent of it's child (which is all of them since they lie immediately under
> a list item). The selector you want to be using is just first (a:first),
> which will return the first matched element on the document only.
>
> Cheers-
> Nic
> http://www.twitter.com/nicluciano
>
>
> On Sat, Jan 17, 2009 at 1:56 PM, Charlie22 <ch...@post.cz> wrote:
>
>>
>> IE7, FF3, GoogleChrome..ok, check this page
>> http://83.240.47.84/skyrace2/del.html
>>
>> On 17 Led, 19:41, jQuery Lover <ilovejqu...@gmail.com> wrote:
>> > What browser are you using? I am using firefox 3.0.5 and jquery 1.3
>> > and it is working!!!
>> >
>> > I have just triple checked...
>> >
>> > $('#menu a:first').remove();
>> >
>> > removes the first anchor in the list.
>> >
>> > ----
>> > Read jQuery HowTo Resource  -  http://jquery-howt.o.blogspot.com
>> >.
>> >
>> >
>> > On Sat, Jan 17, 2009 at 11:33 PM, Charlie22 <ch...@post.cz> wrote:
>> >
>> > > of i add .remove() of course
>> >
>> > > On 17 Led, 19:32, Charlie22 <ch...@post.cz> wrote:
>> > >> I tested it, but it remove all "a", so sry, it doesnt work :-(
>> >
>> > >> On 17 Led, 19:21, jQuery Lover <ilovejqu...@gmail.com> wrote:
>> >
>> > >> > Removing li solves the problem:
>> >
>> > >> > $('#menu a:first');
>> >
>> > >> > ----
>> > >> > Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>> >
>> > >> > On Sat, Jan 17, 2009 at 11:09 PM, Charlie22 <ch...@post.cz> wrote:
>> >
>> > >> > > Hi all, I am playing with jQuery 1.3 and I have provlem with
>> selecting
>> > >> > > a first link in code below. Can you help me how how it should
>> look
>> > >> > > like jQuery code and also for case, if Home will not be a link,
>> so
>> > >> > > "Rules" will be a first link. My traditional way from jQuery
>> 1.2.6
>> > >> > > doesnt work now. ('#menu li a:first')
>> >
>> > >> > > Thx for help in advance.
>> >
>> > >> > > <div id="container">
>> > >> > >        <ul id="menu">
>> > >> > >                <li><a href="#">Home</a></li>
>> > >> > >                <li><a href="#">Rules</a></li>
>> > >> > >                <li><a href="#">Pilots</a></li>
>> > >> > >                <li><a href="#">Briefing</a></li>
>> > >> > >                <li><a href="#">IGC</a></li>
>> > >> > >                <li><a href="#">Results</a></li>
>> > >> > >                <li><a href="#">Forum</a></li>
>> > >> > >        </ul>
>> > >> > > </div>- Skrýt citovaný text -
>> >
>> > >> > - Zobrazit citovaný text -- Skrýt citovaný text -
>> >
>> > >> - Zobrazit citovaný text -- Skrýt citovaný text -
>> >
>> > - Zobrazit citovaný text -
>
>
>

Reply via email to