RYFN / jQuery.clickToEdit

jQuery click-to-edit functionality, for a display element and a corresponding hidden edit element.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic click-to-edit functionality.

####TL;DR This plugin displays a hidden form with the class edit on click of corresponding element with the class display. Form data is then $.ajax data to the action of the edit form.

Check out the demo folder, or the Wiki.

####Basic HTML structure

Something

    <form class="edit" action="/what/ever/" method="post">
      <input type="text" name="Something"/>

      <button type="submit">update</button>
      <button type="button" class="cancel">cancel</button>
    </form>
</div>

####JS

$('.click-to-edit').clickToEdit();

About

jQuery click-to-edit functionality, for a display element and a corresponding hidden edit element.


Languages

Language:JavaScript 100.0%