[jQuery] Re: Selector question

2009-07-29 Thread Hector Virgen
Within your click function, this refers to the element that was clicked (in this case, either #bridge1 or #bridge2). You can then get the (immediate) children of that element that match the selector 'p' and toggle that. $('#bridge1,#bridge2').click(function(){

[jQuery] Re: Selector question

2009-07-29 Thread Brett Ritter
On Wed, Jul 29, 2009 at 4:23 PM, lukasanimod...@gmail.com wrote: How can I pick an id element (here #bridge1,#bridge2) and toggle its child (here a p element) without actually using the id element as parent? 'this p' apparently does not work. $(this).children(p) It only checks immediate

[jQuery] Re: Selector question

2009-07-29 Thread lukas
Thank you for your immediate response, Hector and Brett! I love the jquery group!

[jQuery] Re: selector question

2009-06-09 Thread mkmanning
$(div:not(#+pid+) form span).css(background-color,yellow); On Jun 9, 8:19 am, squalli2008 m...@paskell.co.uk wrote: Hi, Im trying to select all spans in divs containing forms that dont have a certain id $(div:not([id='#'+pid]) form span).css(background-color, yellow); This selects

[jQuery] Re: selector question

2009-06-09 Thread Danny
You probably don't want the '#' character in there: $(div:not(+pid+) form span).css(background-color,yellow); On Jun 9, 11:45 am, mkmanning michaell...@gmail.com wrote: $(div:not(#+pid+) form span).css(background-color,yellow); On Jun 9, 8:19 am, squalli2008 m...@paskell.co.uk wrote: Hi,

[jQuery] Re: selector question

2009-06-09 Thread mkmanning
Yes you do, if you want to filter by ID. Unless the variable pid = #some_id. On Jun 9, 1:29 pm, Danny d.wac...@prodigy.net wrote: You probably don't want the '#' character in there: $(div:not(+pid+) form span).css(background-color,yellow); On Jun 9, 11:45 am, mkmanning michaell...@gmail.com

[jQuery] A selector question

2009-04-28 Thread Dragon-Fly999
Hi, I have the following html and would like to find out how to select #subgroup under #group2. I tried $(#group2 #subgroup) but that didn't seem to work. Thank you. div id=main div id=group1 div id=subgroup ... /div /div div id=group2 div id=subgroup ... /div

[jQuery] complex selector question

2009-01-29 Thread Trend-King
Hi there i want to get all select elements on a page with name=test [1],name=test[2]... is there a way to specify a placeholder in the selector? i think about $('select[name=id[*]]').each(function(){ alert($(this).html()) }); is there any possibility for that? thanks for your replies

[jQuery] Re: Selector Question from a newb

2009-01-15 Thread Karl Swedberg
On Jan 15, 2009, at 1:06 PM, John wrote: This has probably been asked several times on the list but I'm having trouble finding a resolution. Yes. In fact, it has been asked frequently. :)

[jQuery] Re: Selector Question from a newb

2009-01-15 Thread Balazs Endresz
If you are using 1.3 it might be related to this: http://dev.jquery.com/ticket/3848 Anyway, if you select by ID then you don't need any other selectors as IDs are unique. On Jan 15, 7:06 pm, John li...@johndubchak.com wrote: This has probably been asked several times on the list but I'm having

[jQuery] jQuery selector question - Having : in attribute name

2009-01-14 Thread naden
I'm using jQuery 1.2.6 and having an a element with the attribute ajax:id=46 a href=# ajax:id=46Test Link/a According to http://docs.jquery.com/Selectors/attributeEquals#attributevalue you have to escape : with double backslash like I did. alert( $( a[ajax\\:id='46'] ).attr( 'href' ) ); I

[jQuery] Re: Selector Question

2009-01-14 Thread bittermonkey
Got it. Thanks Mike. So this code would have made better sense: $(button:first).click(function(event){alert(this);}) On Jan 13, 5:52 pm, Michael Geary m...@mg.to wrote: Do you have Firebug? If not, get it and enable the Console and Script tabs, then enter these statements into the console

[jQuery] Re: Selector Question

2009-01-13 Thread Michael Geary
Do you have Firebug? If not, get it and enable the Console and Script tabs, then enter these statements into the console input line, one at a time with Enter after each one: $(button) $(button)[0] $( $(button)[0] ) Each one will log an object to the console log. Click on each of these objects

[jQuery] Re: selector question: how many ul above $(this) ?

2008-12-30 Thread pixeline
nevermind, found it! var thisMenuLevelInt = $thisA.parents('ul').length; On 30 déc, 17:22, Alexandre Plennevaux aplennev...@gmail.com wrote: hello mates, i have a multiple level dropdown menu, the markup is an unordered list of the likes: ul lia href=#me/a           ullia

[jQuery] Re: selector question

2008-12-04 Thread MorningZ
If you don't want to manipulate the td's themselves, then you have to have the content of the td's wrapped in some sort of object so that you can show/hide it... something your example HTML doesn't have On Dec 4, 12:56 pm, clorentzen [EMAIL PROTECTED] wrote: Hi -- I'm trying to hide all the

[jQuery] Re: selector question

2008-12-04 Thread Charlie Griefer
On Thu, Dec 4, 2008 at 9:56 AM, clorentzen [EMAIL PROTECTED] wrote: I'm trying to hide all the contents from tds within a table *except* for the first td in each tr... I don't want to hide the tds, just their contents, but I'm having trouble finding the correct selector(s) to accomplish

[jQuery] Re: selector question

2008-12-04 Thread Charlie Griefer
On Thu, Dec 4, 2008 at 10:28 AM, Charlie Griefer [EMAIL PROTECTED]wrote: On Thu, Dec 4, 2008 at 9:56 AM, clorentzen [EMAIL PROTECTED]wrote: I'm trying to hide all the contents from tds within a table *except* for the first td in each tr... I don't want to hide the tds, just their contents,

[jQuery] Re: selector question

2008-12-04 Thread clorentzen
Thanks! The lack of something else wrapping each tds content was indeed the problem. On Dec 4, 1:34 pm, Charlie Griefer [EMAIL PROTECTED] wrote: On Thu, Dec 4, 2008 at 10:28 AM, Charlie Griefer [EMAIL PROTECTED]wrote: On Thu, Dec 4, 2008 at 9:56 AM, clorentzen [EMAIL PROTECTED]wrote:

[jQuery] Simple Selector Question -- Context

2008-12-03 Thread Joe
If I have the following: var pError = $('p.error'); Then I can do the following with no problem: pError.text('lorem); Yet, I want to check for the paragraphs that have the class error that are visible, I would think it is something like this: var visibleError = $(':visible', pError);

[jQuery] Quick Selector Question...

2008-08-25 Thread Scott Phillips
How can I select all text inputs that have an ID that end in date? Thanks Scott.

[jQuery] beginner selector question

2008-05-08 Thread bobh
hello, I'm wondering if there is such a thing as: $(div).hover( function(){ $(this.p).show(); }, function(){ $(this.p).hide(); } ); I know the above code is useless because of the use of this but I wonder if there's a selector

[jQuery] Expression/Selector question...

2008-05-05 Thread Dan G. Switzer, II
One thing that I've noticed is that the expr attribute is pretty inconsistent across methods (such as filter, find, parents, parent, etc.) The documentation is very vague about what an expression is, other than it just being a selector. However I would assume a valid expression for one element

[jQuery] :contains selector question

2007-11-24 Thread Benjamin Sterling
Hey guys, Wanted to make sure I am getting the correct returned elements. Assume I have a table like: table cellpadding=3 cellspacing=0 border=1 width=100% tbody tr tdCell 1/td tdCell 2/td tdCell 3/td

[jQuery] advanced selector question

2007-10-16 Thread tpneumat
Hi, I am trying to implement ifixpng for all elements that have a .png as the background image. Is there a way to grab these (and only these) with one nicely written selector? Thanks, Jeremy

[jQuery] Re: Selector Question

2007-08-25 Thread Joan Piedra
Glad I could help :) On 8/24/07, Pops [EMAIL PROTECTED] wrote: That did it! Thanks Joan! -- HLS On Aug 24, 12:51 am, Joan Piedra [EMAIL PROTECTED] wrote: Hey Pops, I have not tested this, but should work. Just use the next node. $('legend').click(function(){

[jQuery] Re: Selector Question

2007-08-23 Thread Joan Piedra
Hey Pops, I have not tested this, but should work. Just use the next node. $('legend').click(function(){ $(this).next().fadeOut(250); }); On 8/24/07, Pops [EMAIL PROTECTED] wrote: I have HTML like so with a bunch of fieldset tags: fieldsetlegend[ Title1 ]/legenddiv id='wc1'/div/fieldset

[jQuery] Re: Selector Question should be easy (continued with online example)

2007-08-16 Thread Karl Swedberg
On Aug 16, 2007, at 4:01 AM, Wizzud wrote: Your 'jQuery_How_Do_I_not.html' IS working. If you were to change one of the #ee colours to some completely different colour you would be able to see the effect of clicking on div1. However, when you click on div2 both click handlers are invoked

[jQuery] Re: Selector Question should be easy (continued with online example)

2007-08-16 Thread Mitch
Awesome! I got it working and improved it: http://www.whatbird.com/wwwroot/Components/jQuery_How_Do_I_not3.html You can now see clicking any div other then div2 unfocuses div2 while clicking on div2 gives it focus again. And they said it could not be done! Thanks for the help. Mitch PS Karl

[jQuery] Re: Selector question should be easy

2007-08-15 Thread Klaus Hartl
Mike Alsup wrote: You need to add the '#' for id selection. $(div :not('#myID')); Mike Mike, I'm not so sure about the white space before the colon, theoretically div :not(#myId) would select all children of div that do not have that particular id? --Klaus

[jQuery] Re: Selector question should be easy

2007-08-15 Thread Klaus Hartl
Mitch wrote: Does anyone have a way to select all divs except one with a specific ID? I want something like $(* :not(myID)).click or $(div :not(myID)).click I have tried :not but have not been able to get it to work on IDs, seems that it just works on elements. thanks Mitch Try

[jQuery] Re: Selector question should be easy

2007-08-15 Thread Mike Alsup
You need to add the '#' for id selection. $(div :not('#myID')); Mike On 8/15/07, Mitch [EMAIL PROTECTED] wrote: Does anyone have a way to select all divs except one with a specific ID? I want something like $(* :not(myID)).click or $(div :not(myID)).click I have tried :not but

[jQuery] Re: Selector question should be easy

2007-08-15 Thread Karl Swedberg
On 8/15/07, Mitch [EMAIL PROTECTED] wrote: Does anyone have a way to select all divs except one with a specific ID? On Aug 15, 2007, at 3:52 PM, Mike Alsup wrote: You need to add the '#' for id selection. $(div :not('#myID')); And you need to close the space between div and :not

[jQuery] Re: Selector question should be easy

2007-08-15 Thread John Resig
Yeah, your selector should be: $(div:not(#myID)) --John On 8/15/07, Mitch [EMAIL PROTECTED] wrote: Does anyone have a way to select all divs except one with a specific ID? I want something like $(* :not(myID)).click or $(div :not(myID)).click I have tried :not but have not been

[jQuery] Re: Selector question should be easy

2007-08-15 Thread Mike Alsup
Oops. Thanks for catching that! (You too, Karl) On 8/15/07, Klaus Hartl [EMAIL PROTECTED] wrote: Mike Alsup wrote: You need to add the '#' for id selection. $(div :not('#myID')); Mike Mike, I'm not so sure about the white space before the colon, theoretically div :not(#myId)

[jQuery] Re: Selector question should be easy

2007-08-15 Thread Mitch
I news for all of you, none of these suggestions work. Here is my code you can run it and see. When I add the last click handler it breaks the 2nd one and nothing happens. My guess is that is still not the right selector. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://