Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inline editing with jQuery

Tags:

jquery

Are there any guidelines on doing 'inline' editing with jQuery?

I know I am not using the correct term here, but basically you click on a some text and dynamically the area changes to an editable input box with a submit button.

Is there any built in capabilities with jQuery?

like image 582
mrblah Avatar asked Dec 17 '22 07:12

mrblah


2 Answers

jQuery has nothing built-in as far as I know, but check out Jeditable, which is a jQuery plugin.

like image 135
Matthew Groves Avatar answered Dec 30 '22 08:12

Matthew Groves


You can do something like this:

<input type="text" value="someText" id="editableText" class="hideBorder"/>

$('#editableText').toggle(function() {
             $(this).removeClass('hideBorder');
          }, function() {
             $(this).addClass('hideBorder');
          });

.hideBorder {
 border: 0;
}
like image 39
Daniel Moura Avatar answered Dec 30 '22 09:12

Daniel Moura