JQuery plugin to implement a flexible "edit in place" mechanism
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
README.md
in-da-house.js
test.html

README.md

In-Da-House

A JQuery plugin to implement a flexible "edit in place" mechanism

Oh... BTW, even if it's working, it's alpha.

Usage

It's a JQuery plugin, so... It needs JQuery. But nothing else.

Browser

Include and invoke in-da-house.js in your app as usual.

So far, the basic expected HTML structure is a container, let's say a div, containing some sort of user input element (input, textarea, select).

<div class="edit_in_da_house">
<input type="text" name="name">
</div>

That's all, yet that's mandatory, in-da-house won't create the user input element. Why ? Because most of the time the user input will come with additionnal classes, a value from a database, etc... All this is much more handily rendered by a framework related templating system.

Also, have a look at the HTML snippets in test/fixtures, to get a better glimpse of what the library expects and is capable of.

API

A container, on which in_da_house(options) has already being called, can call in_da_house('method') again, with method being one of $.in_da_house prototype. This will be more thoroughly specified later.

$('.selector').in_da_house({that: 'option'});
// may have already been called by the library if the default class was set on the container

$('.selector').in_da_house('switchEditor');
// this will "manually" set the editor elements as visible, and the editable hidden

Why?

Because I already had snippets dealing out with this feature before i looked at what already existed and i wanted to further the concept.

Because, despite what other libraries stated, i found them not enough flexible and easy to integrate with the use of a framework.

License

MIT License

Copyright (C) 2011 by af83