On Jan 24, 11:59 am, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> On Jan 23, 2008, at 11:50 PM, frizzle wrote:
>
>
>
> > Hi there,
>
> > Imagine i have a DIV with editable content (with Jeditable), but i
> > want the trigger for that to be a link behind the div.
> > It´s probably very simple, but i´m pretty new to jQuery and do not
> > know how to achieve this.
> > It has to look somewhat like this;
>
> >     <div class="edit" id="unique_id">Editable text</div> <a
> > href="#">Edit me!!</a>
>
> If your html is:
>
> -cut-
>    <div class="edit" id="unique_id">Editable text</div> <a href="#"
> class="edit_trigger">Edit me!!</a>
> -cut-
>
> You could do something like:
>
> -cut-
>   $(".edit").editable("<?php print $url ?>echo.php", {
>       event     : "edit"
>    });
>    $(".edit_trigger").bind("click", function() {
>        $(this).prev().trigger("edit");
>    });
> -cut-
>
> Hope this helps.
>
> --
> Mika Tuupolahttp://www.appelsiini.net/

Thank you both for your answers. I don't have time to test it yet, but
i'm eager to try them!
The way i see it now, i'll need Javier's code, if i'm right Mika's
code would still require the actual editable item to be a trigger.

Thanks again, i'll let you guys know what i did.

Frizzle.

Reply via email to