Yeah, got my stuff to work very nicely now...
... until, that is, i thought to try it in Mangleweb Exploder and now
it's all borked.
I'm going to cry now.
> is there a way to recursively roll out until you reach a parent
> that matches a given id?
Here's the way to do it:
$("clickedElement").click(function(){
this.parent("#idOfWantedParent").doSomethingWithIt();
});
I think it should work this way, if not try to experiment with this or
$(this
dave.methvin wrote:
>
>
>> ... is there a way to recursively roll out until you reach a parent
>> that matches a given id?
>
> It sounds like you want .parents(selector), which looks for the
> ancestor elements matching the selector.
>
> http://docs.jquery.com/Traversing/parents#expr
>
>
> ... is there a way to recursively roll out until you reach a parent
> that matches a given id?
It sounds like you want .parents(selector), which looks for the
ancestor elements matching the selector.
http://docs.jquery.com/Traversing/parents#expr
4 matches
Mail list logo