Kriem
Kriem

Reputation: 8705

jQuery - Edit in place without an input element. Is it possible?

jQuery is really easy for creating a nice 'edit in place' effect, but, despite its effectiveness, it always uses some input element.

It bugs me, as it distorts the layout, the moment the element replaces the original text.

Does anyone know a technique to circumvent this annoyance?

Upvotes: 0

Views: 682

Answers (1)

FatherStorm
FatherStorm

Reputation: 7183

yes. create CSS rules that override all the input field annoyances and force it to render in a way that matches the original element.

.dynInput{
border:none;
font-size:inherit;
font-weight:inherit;
background-color:inherit;
}

Upvotes: 4

Related Questions