Thank you for your immediate response, Hector and Brett! I love the
jquery group!
On Wed, Jul 29, 2009 at 4:23 PM, lukas 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 children (as wi
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(){
$(this).children('p').toggle
Yes you do, if you want to filter by ID. Unless the variable pid =
"#some_id".
On Jun 9, 1:29 pm, Danny 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 wrote:
>
>
>
> > $("div:not(
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 wrote:
> $("div:not(#"+pid+") form span").css("background-color","yellow");
>
> On Jun 9, 8:19 am, squalli2008 wrote:
>
> > Hi,
>
> > Im trying to
$("div:not(#"+pid+") form span").css("background-color","yellow");
On Jun 9, 8:19 am, squalli2008 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 selec
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 wrote:
> This has probably been asked several times on the list but I'm having
> trouble finding a
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. :)
http://docs.jquery.com/Frequently_Asked_Questions#Why_doesn.27t_an_event_work_on_a_new_element_I.27ve_cre
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" wrote:
> Do you have Firebug? If not, get it and enable the Console and Script tabs,
> then enter these statements into the console input
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
ob
nevermind, found it!
var thisMenuLevelInt = $thisA.parents('ul').length;
On 30 déc, 17:22, "Alexandre Plennevaux"
wrote:
> hello mates,
>
> i have a multiple level dropdown menu, the markup is an unordered list
> of the likes:
>
>
> me
> me
> me
>
Thanks! The lack of something else wrapping each s 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 PROTECTE
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 s within a table *except*
>> for the first in each ... I don't want to hide the s,
>> just their conte
On Thu, Dec 4, 2008 at 9:56 AM, clorentzen <[EMAIL PROTECTED]> wrote:
>
> I'm trying to hide all the contents from s within a table *except*
> for the first in each ... I don't want to hide the s,
> just their contents, but I'm having trouble finding the correct
> selector(s) to accomplish this.
If you don't want to manipulate the 's themselves, then you have
to have the content of the '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
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(){
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(){
> $(this).next().fadeOut(250);
>
> });
>
> On 8/24/07, Pops <[EMAIL PROTECTED]> wrote
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 tags:
>
> [ Title1 ]
> [ Title2 ]
> ..
> [ Titlen ]
>
> These fade in
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
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 -
"Is this my stupidity again?"
I'm afraid it might be, yes!
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 handle
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.
http://www.w3.org/1999/xhtml";>
Untitled Document
$(document).ready(f
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
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
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 :n
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
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
>
>
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
Tr
28 matches
Mail list logo