Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a label change to a text box using jQuery

I have some labels that I want to allow users to edit. Is it possible to do this and if so how (using jQuery).

When a user clicks a label, it turns into a textbox, which has the existing "label text" contained within. When the user then edits the label and clicks somewhere other than the text box, the value is saved.

This might actually be a few pieces of functionality in one, if you could help, it would be much appreciated.

like image 662
Ankur Avatar asked Dec 01 '25 09:12

Ankur


2 Answers

What you are describing is often referred to as an "in place editor". You should check out the Jeditable plugin demo page. I think it's exactly what you're looking for.

like image 189
zombat Avatar answered Dec 04 '25 16:12

zombat


I would suggest looking into some of the "edit in place" plugins.

Check out the live demo.

like image 24
Soviut Avatar answered Dec 04 '25 16:12

Soviut



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!