I have a product page where, if the user clicks on the edit, the overlay form window is filled in to make it editable.
After editing is completed and the user clicks the submit button, I want to update text()each field of the product that has been changed.
So, instead of getting the value of each input and update field, there is a way that I can use $(this).serialize()as an array
The current solution I'm thinking of is:
var name = $("#input_name").val();
$("#name_id").innerhtml(name);
But the problem is that there are many fields, and I wanted to use the power of jQuery instead of manually capturing each value of the input field.
source
share