Inplace/Inline Editor With Save/Cancel Buttons - jQuery inplace.js

File Size: 28.7 KB
Views Total: 6346
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Inplace/Inline Editor With Save/Cancel Buttons - jQuery inplace.js

inplace.js is a lightweight and easy-to-use jQuery inline editing plugin that allows visitors to edit the content of any DIV and then send the resulting change to a specific URL via AJAX.

The plugin converts a DIV element into an input field with Cancel & Save buttons when you click on it.

How to use it:

1. Insert the main JavaScript file inplace.js after loading the latest jQuery library.

<script src="" 
<script src="lib/inplace.js"></script>

2. Initialize the plugin on the target DIV element which should be editable.

<div class="inplace">
  Click Me To Edit

3. Customize the appearance of the inplace/inline editor.

  buttonOrder:   ['cancel', 'save'],
  cancel:        true,
  cancelClass:   'inplace__cancel',
  cancelValue:   'Cancel',
  checkable:     ['checkbox', 'radio'],
  fieldClass:    'inplace__field',
  fieldName:     undefined,
  fieldTemplate: '{name}',
  fieldType:     'text',
  save:          true,
  saveClass:     'inplace__save',
  saveValue:     'Save',
  selectable:    ['select-one', 'select-multiple'],
  typeful: [

4. Customize the URL you want to send the change to.


  // AJAX method
  method: 'PATCH',

  // URL
  url: '/save'

5. You can also pass the options via data-option attributes:

<div class="inplace"
     Click Me To Edit

This awesome jQuery plugin is developed by wbotelhos. For more Advanced Usages, please check the demo page or visit the official website.