[jQuery] Re: :not selector

2009-02-27 Thread Mauricio (Maujor) Samy Silva
Hi Pedro, It is hard to figure out what you are trying to select without a look on the HTML markup. What does you mean with "half of the elements i get with"? It depends upon the markup! In nth-child(n) is n constant or inside a loop? How about a sample of your markup and information about wh

[jQuery] Re: not selector

2009-02-01 Thread Karl Swedberg
Try $('div.first:not(.second)') and $('li:not(.jq-first)') (without tag names in the :not() selector) --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 1, 2009, at 12:40 PM, Javier Martinez Fernandez wrote: I'm having some problems using the "not" sel

[jQuery] Re: :not selector ---> not working

2008-12-20 Thread John Resig
That's an XPath selector, not a CSS selector. To do that in jQuery you would need to do: $("tr:not(:has(th)):even") --John On Dec 20, 9:38 am, "chinnakarup...@gmail.com" wrote: > Hi, > I tried a eg for :not operator.According to which it should not pick > up the Table header but it does .what

[jQuery] Re: Not selector help

2008-09-03 Thread Josh Nathanson
This should do it... $("input:checkbox:not(#myid)").attr("checked",false); -- Josh - Original Message - From: "Brad" <[EMAIL PROTECTED]> To: "jQuery (English)" Sent: Wednesday, September 03, 2008 11:57 AM Subject: [jQuery] Not selector help I'm looking for the quickest way to u

[jQuery] Re: :not selector broken in v1.2.1?

2007-10-27 Thread jkl
yea, that works, thanks Karl! Yea, i agree too that following css convention is a better choice. Here's the other deprecated stuff in v1.2 that I just found (for other newbies): http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality john On Oct 26, 7:13 pm, Karl Swedberg <[EMAIL PROTECT

[jQuery] Re: :not selector broken in v1.2.1?

2007-10-26 Thread Karl Swedberg
On Oct 26, 2007, at 8:21 PM, jkl wrote: Hi, I am running the sample from the learning jquery book chap.2 on p. 28. $('th').parent().addClass('table-heading'); $('tr:not([th]):even').addClass('even'); $('tr:not([th]):odd').addClass('odd'); It runs fine with the v1.1 that is included

[jQuery] Re: "NOT" Selector

2007-06-07 Thread Benjamin Sterling
--- I don't think it's a bug, and I'm not surprised this selector doesn't work.. This is first selecting all elements that are descendants of #document. Then, from that set of matching elements, it's trying to remove all that have a class of "menu" and a descendant . So, it should select all of

[jQuery] Re: "NOT" Selector

2007-06-07 Thread Karl Swedberg
1. The first form - $("#document a").not(".menu a").dostuff() - should work. I think that this is a bug that it doesn't, and should be reported as such. I don't think it's a bug, and I'm not surprised this selector doesn't work.. This is first selecting all elements that are descendants

[jQuery] Re: "NOT" Selector

2007-06-07 Thread Brian Miller
1. The first form - $("#document a").not(".menu a").dostuff() - should work. I think that this is a bug that it doesn't, and should be reported as such. 2. This does work: $("#document a").not( $(".menu a") ).dostuff(); Instead of removing the elements by expression, you're doing a second selec

[jQuery] Re: "NOT" Selector

2007-06-07 Thread Mike Alsup
James, I think you're looking for "filter": $("#document a").filter(".menu a").dostuff(); I have tried: $("#document a").not(".menu a").dostuff(); $("#document *:not(.menu) a").dostuff(); $("#document a:not(.menu a)").dostuff(); I am at a loss. No doubt there is a really simple way of sayi