Jquery edit inplace

Hi everyone, I am new to jquery and im trying to do in-place editing (simple)

but I don’t know how to check if users click on the submit: b link.

Do you know a simple tutorial on how to create an editing system :) ?.

I have it 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 kind of ajax or which is better :)?

+3
source share
3 answers

Why not use code that someone else wrote? There are tons of libraries that are already doing this for you. Two really good ones:

Save time and move on to writing meaningful (read: added) code.

+1
source
0
source

Source: https://habr.com/ru/post/1792034/


All Articles