[jQuery] Re: Attribute Selectors

2009-10-08 Thread James
var tabId = $("#tabPanel2 ul li a[onclick*="+newsCookie+"]").attr ('id'); Whether the actual selector works or not, I'm not sure. On Oct 8, 11:38 am, vmrao wrote: > I have the following code. > > var newsCookie = readCookie('newsTabCk'); > var tabId = $("#tabPanel2 ul li a[onclick*=newsCookie]"

[jQuery] Re: Attribute selectors

2007-05-28 Thread Adrian Gheorghe
In that project I did manage to get the thing going. What I was trying to say is that at first I did try to search for a negating operator and I was surprised to see none was available. To be honest, I didn't try Karl's solution, that is using something like $(':not([EMAIL PROTECTED])') because I

[jQuery] Re: Attribute selectors

2007-05-28 Thread besh
Hello Adrain, have you tried something like this? $('div').not('.myClass') This will get all divs on a page except those with class .myClass. Bohdan

[jQuery] Re: Attribute selectors

2007-05-27 Thread Karl Swedberg
Glen's suggestions should work. For classes, the best way is probably to use the class selector, along with "not" (either as a method or a pseudo-class). So in addition to Glen's examples, you could do this: $('p:not(.myclass)') For other attributes, you can do something like this, too: $(

[jQuery] Re: Attribute selectors

2007-05-27 Thread Glen Lipka
How about: $("p").not("#selected") or $("input").not("[EMAIL PROTECTED]" + somevariable + "]") You also have filter() and some other ways of finding it. Glen On 5/27/07, Adrian Gheorghe <[EMAIL PROTECTED]> wrote: Hello everyone, In a project, a few weeks ago, I needed support for something