Код: Выделить всё
pt = $(this).parents("table.tablebg");
username = pt.find("b[class='postauthor']:first").text();
Код: Выделить всё
$("#addQuote").click(function () {
$(this).hide();
username = pt.find("b[class='postauthor']:first").text();
insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
});
setTimeout(function() { $("#addQuote").hide(); }, 10000);
UPD: я понимаю, что события скрытия будут приходить с предыдущего выделения, но меня это устраивает.


