Posted by DJ DUST 22/04/2016 0 Comment(s)

Leave a Comment

';html+='
'+response.data.date+', '+response.data.time+'';if(response.data.website){html+=', '+response.data.website+'';} html+='
';html+='Reply';html+='

'+response.data.comment+'

';html+='
';$appendTo.before(html);} callback&&callback(response.message);} if(response.status==='error'){$.each(response.errors,function(i,field){$form.find('[name="'+field+'"]').addClass('has-error');});}},'json');} $('.reply-btn').live('click',function(){var $comment=$(this).closest('.comment');if($comment.attr('data-has-form')==='false'){var $form=$('.post-comment form').clone();$form.find('.has-error').removeClass('has-error');$form.append('');$form.find('a').removeClass('comment-submit').addClass('reply-submit');$comment.append('

Leave a Reply

'+$form.html()+'
');$comment.attr('data-has-form','true');}else{$comment.find('.reply-form').remove();$comment.attr('data-has-form','false');}});$('form .comment-submit').live('click',function(){var $form=$(this).closest('form');var $comment_form=$('.post-comment');generateComment($form,'comment',$comment_form,function(message){$comment_form.before('
'+message+'
');setTimeout(function(){$('.comments .success').fadeOut(400);},2000);$form[0].reset();});});$('form .reply-submit').live('click',function(){var $form=$(this).closest('form');var $reply_form=$(this).closest('.comment').find('.reply-form');generateComment($form,'reply',$reply_form,function(message){$reply_form.before('
'+message+'
');setTimeout(function(){$('.comments .success').fadeOut(400);},2000);$form.closest('.comment').attr('data-has-form','false');$reply_form.remove();});});