[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] 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] 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] 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://