Updating a DIV while writing text into a textarea
问题 I would like to "live" update a DIV in the page with the text the user enter in a textarea. I have the following markup <div id="previewNote" class="note yellow" style="left:25;top:25px;z-index:1;"> <div class="body"></div> <div class="author"></div> <span class="data"></span> </div> and wrote this jQuery code /* Listening for keyup events on fields of the "Add Note" form: */ $("[ID$=NoteText]").live('keyup', function(e) { if (!this.preview) this.preview = $("[ID$=previewNote]"); /* Setting