6 $("a.user_name").each(function(){
13 $("#sent_id").autocomplete(auto);
14 $("#allMessage").click(function(e) {
15 var $this = $(e.target);
16 var type = $this.attr('class');
18 case 'msg_replie_btn':
20 $("#sent_id").val($this.parent().parent().find(".status_word").find(".user_name").attr("id"));
21 $("#textbox").focus();
23 case 'msg_delete_btn':
25 var message_id = $.trim($this.parent().parent().find(".status_id").text());
26 var confirm = window.confirm("Are you sure to delete this message?");
29 updateSentTip("Deleting message...", 5000, "ing");
31 url: "ajax/delete.php",
33 data: "message_id=" + message_id,
34 success: function(msg) {
35 if (msg.indexOf("success") >= 0) {
36 $this.parent().parent().parent().remove();
37 updateSentTip("Message deleted.", 3000, "success");
39 updateSentTip("Failed to delete this message!", 3000, "failure");
42 error: function(msg) {
43 updateSentTip("Failed to delete this message!", 3000, "failure");