2 $(".rt_btn").click(function(e){
\r
4 if ($("#textbox").length > 0) {
\r
7 $("#info_head").before('<h2>What are you doing?</h2>' + formHTML);
\r
13 $(".replie_btn").click(function(e){
\r
15 if ($("#textbox").length > 0) {
\r
18 $("#info_head").before('<h2>What are you doing?</h2>' + formHTML);
\r
24 $("#list_send_btn").click(function(e){
\r
26 if ($("#textbox").length == 0) {
\r
27 $("#info_head").before('<h2>What are you doing?</h2>' + formHTML);
\r
32 $(".favor_btn").live("click", function(e){
\r
37 $("#list_follow_btn").live("click", function(e){
\r
39 var $this = $(this);
\r
40 var id = $("#info_name").text();
\r
41 updateSentTip("Following list " + id + "...", 5000, "ing");
\r
44 url: "ajax/list.php",
\r
46 data: "action=create&id=" + id,
\r
47 success: function(msg) {
\r
48 if (msg.indexOf("success") >= 0) {
\r
49 updateSentTip("You have followed " + id + ".", 3000, "success");
\r
50 $this.after('<a class="info_btn_hover" id="list_block_btn" href="javascript:void(0)">Unfollow</a>');
\r
53 updateSentTip("Failed to follow list " + id + ".", 3000, "failure");
\r
56 error: function(msg) {
\r
57 updateSentTip("Failed to follow list " + id + ".", 3000, "failure");
\r
63 $("#list_block_btn").live("click", function(e){
\r
65 var $this = $(this);
\r
66 var id = $("#info_name").text();
\r
67 updateSentTip("Unfollowing list " + id + "...");
\r
69 url: "ajax/list.php",
\r
71 data: "action=destory&id=" + id,
\r
72 success: function(msg) {
\r
73 if (msg.indexOf("success") >= 0) {
\r
74 updateSentTip("You have unfollowed list " + id + ".", 3000, "success");
\r
75 $this.after('<a class="info_btn" id="list_follow_btn" href="javascript:void(0)">Unfollow</a>');
\r
78 updateSentTip("Failed to unfollow list " + id + ".", 3000, "failure");
\r
81 error: function(msg) {
\r
82 updateSentTip("Failed to unfollow list " + id + ".", 3000, "failure");
\r
88 document.onclick = function(){
\r
89 document.title =document.title.replace(/(\([0-9]+\))/g, "");
\r
91 var args = location.href.split("?")[1];
\r
92 if (!args.split("&")[1] || args.split("&")[1] == "p=1") {
\r
93 setInterval(function(){
\r
100 var since_id = $(".timeline li:first-child").find(".status_id").text();
\r
101 var list_id = $("#info_name").text();
\r
103 url: "ajax/updateList.php",
\r
106 data: "id=" + list_id + "&since_id=" + since_id,
\r
107 success: function(msg) {
\r
109 if ($.trim(msg).indexOf("</li>") > 0) {
\r
110 $(".timeline").prepend(msg);
\r
112 if (document.title.match(/\d+/) != null) {
\r
113 num = parseInt(document.title.match(/\d+/));
\r
115 document.title = "(" + (num+$(msg).length )+ ")" + document.title.replace(/(\([0-9]+\))/g, "");
\r