Return to Snippet

Revision: 34135
at October 18, 2010 03:33 by audiopleb


Initial Code
$(function() {
$('#comment').one('focus',function() {
});
var $comment = ''; 
$('#comment').keyup(function() {
$comment = $(this).val();
$comment = $comment.replace(/\n/g, "<br />").replace(/\n\n+/g, '<br ><br />').replace(/(<\/?)script/g,"$1noscript");
$('p.live-preview').html($comment);
});
});



<div class="comment-preview">
<h3>My Comment Preview</h3>
<p class="live-preview">placeholder text</p>
</div>

Initial URL

                                

Initial Description

                                

Initial Title
Live Comment Preview for Expression Engine

Initial Tags

                                

Initial Language
jQuery