Created
January 27, 2012 23:44
-
-
Save tuupola/1691627 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="edit" id="unique_id">Editable text</div> | |
<a href="#" class="edit_trigger">Edit me!!</a></pre> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Bind Jeditable instances to "edit" event. */ | |
$(".edit").editable("http://www.example.com/save.php", { | |
event : "edit" | |
}); | |
/* Find and trigger "edit" event on correct Jeditable instance. */ | |
$(".edit_trigger").bind("click", function() { | |
$(this).prev().trigger("edit"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment