jQuery的就地编辑

Hello all im new to jquery and im trying to make a edit inplace (simple)

but i dont know how to check if the users click on the edit submit bottom :b.

do you know a simple tutorial how to make a edit system :)?.

i have this now

$(function() {
    $('#forum_dato a').click(function()
    {
        //var data = $('#data').text();
        $('#data').html('<form action="..." method="post"><textarea name="data">' + 
                  $('#data').text() + 
                  '</textarea><input type="submit" value="Edit"></form>');
        return false;
    })
})

do i need to use some ajax or what is best :)?

Why not use the code someone else has already written? There are tons of libraries that already do this for you. Two really good ones:

Save yourself the time and go write meaningful (read: value-added) code.

This question already has been asked, and have decent answers IMO, https://stackoverflow.com/questions/708801/whats-the-best-edit-in-place-plugin-for-jquery

If it doesn't fit you need or have any other question, feel free to ask. :)


here you can find a nice plugin, maybe you can find some useful hints

demosite
doku