diff options
Diffstat (limited to 'web/scripts4.js')
-rw-r--r-- | web/scripts4.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/web/scripts4.js b/web/scripts4.js new file mode 100644 index 00000000..f417dfc4 --- /dev/null +++ b/web/scripts4.js @@ -0,0 +1,17 @@ +function blogsLoadPM(uname) { + $.getJSON('http://api.juick.com/pm?hash='+hash+'&uname='+uname+'&callback=?').done(function(data) { + var ul=$('#content>ul'); + ul.empty(); + $("p.page").hide(); + $.each(data,function(i,item) { + var li=$("<li/>"); + if(item.user) { + li.attr("class","pm-in"); + } else { + li.attr("class","pm-out"); + } + li.text(item.body); + li.appendTo(ul); + }); + }); +} |