treehouse : what would you like to learn today?
Web Design Web Development iOS Development

jQuery Strategy for Status Update Feature

  • Many of you have probably seen a website (like Facebook) where you click on some text and it becomes a text box. If you enter text and click save it writes the new text where the old text was...if you cancel, it writes the old text back...all using the same bit of real estate on the page.

    Has anyone seen an example of that in a tutorial anywhere? Before I reinvent the wheel (using a div and over-writing it on click with some back-up logic), I was curious if there was a pattern for this yet. If you have, is there a name for this feature?

    Thanks in advance.
  • Had a thought while writing this to just have the status be in an input text field to start, remove the decoration, and re-apply the decoration when it is active. More to come... :)
  • Just did a quick search and found this http://josephscott.org/archives/2008/11/introducing-jquery-edit-in-place-jeip/, this http://code.google.com/p/jquery-in-place-editor/ and this http://www.appelsiini.net/projects/jeditable/default.html
    That should get you started :D