HI,

Try to use the parent method, like this:

$("[EMAIL PROTECTED]").bind("click", function(ev) {
       alert( $( this ).parent().html() );
    });

2007/8/17, Michael Schwarz [MVP] <[EMAIL PROTECTED]>:
>
>
> Hi,
>
> is it possible to find a parent element? See following example:
>
> <div _prop="test">1
>     <div>2
>         <div>3
>             <div>4
>             </div>
>         </div>
>     </div>
> </div>
>
>
> $("[EMAIL PROTECTED]").bind("click", function(ev) {
>     alert($(ev.srcElement).html());
> });
>
>
> If you run this you will always get the element under the mouse
> instead of the _prop element (which you want to get). What I'm
> searching for is something like:
>
>
> $("[EMAIL PROTECTED]").bind("click", function(ev) {
>     alert($(ev.srcElement).findParent("[EMAIL PROTECTED]").html());
> });
>
>
> Michael
>
>


-- 
Abraços
Estevão Lucas

Reply via email to