Posted By

davebowker on 04/20/09


ajax jquery comment preview

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


jQuery ajax comment preview

 / Published in: JavaScript


  1. //$('.ukn-search-advanced').append('<em>Looking for:</em><div class="ukn-form-textbox-preview"></div><input class="ukn-search-advanced-submit" type="button" value="Search" onclick="this.form.submit();" />');
  2. $('.ukn-form-textbox-preview').html($(this).val());
  3. $(this).keyup(function(){
  4. if ($('.ukn-form-searchbox').val() !== "") {
  5. $('.ukn-search-advanced-extra').show();
  6. }
  7. var $comment = '';
  8. $comment = $(this).val();
  9. $('.ukn-form-textbox-preview').html($comment);
  10. $comment = $comment.replace(/\n/g, "<br />").replace(/\n\n+/g, '<br /><br />').replace(/(\<\/?)script/g, "$1noscript");
  11. })

Report this snippet  


RSS Icon Subscribe to comments
Posted By: eddie0007 on January 21, 2019

Hi guys if you are unable to sync setting in window 10 then visit How do I sync my settings in windows 10 you solve the problem just visit Windows 10 sync settings and learn step by step

Posted By: funnyjokes on February 28, 2019

The website is looking bit flashy and it catches the visitors eyes. Design is pretty simple and a good user friendly interface. wuxiaworld

You need to login to post a comment.