Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var $txtarea = $("textarea").attr('id', 'form_comment'),
- $c_temp = $(document.createElement('div')),
- quote_this = function(a,c) {return '[quote='+ a + ']\n'+ c.split('<br>').join('\n') +'\n[/quote]\n'};
- ;
- $(".reply").off().live("click", function(){
- var comment = $.trim($(this).closest(".comment").find(".content").html()),
- author = $(this).closest(".comment").find(".header b").text(),
- currval = $txtarea.val();
- ;
- comment = $c_temp.html(comment).find('fieldset').replaceWith(function() {
- var $n = $('> legend', this), n = $n.text(); $n.remove();
- return quote_this(n, $(this).html())
- }).end().html();
- window.location.hash = '#form_comment';
- $txtarea.val(quote_this(author, comment)).focus();
- return false;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement