On Jan 24, 2008, at 1:39 PM, frizzle wrote:

-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.

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.


No, the trigger is <a> after the editable item. All I did was I added class="edit_trigger" to example HTML you provided.

--
Mika Tuupola
http://www.appelsiini.net/

Reply via email to