Homeland 实现了 @ mentions. 求赐教. : )

ichord · January 24, 2012 · Last by poshboytl replied at February 04, 2012 · 3591 hits

IE6,7,8 兼容性测试通过。


前几天模仿 weibo 的 @ mentions,自己实现了一个“一样”的。

今天在放到 ruby-china 的时候出现多问题。

  • ruby-china 的 textarea 带了 autogrow 插件。这个会影响到 "@"字符 offset 的计算
  • 当添加评论后,ajax 加入的"楼" 又会影响到 textarea offset 的计算。
  • 受到 textarea 原先绑定了 keydown 事件。不能上下困动选择
  • *现在就差兼容性测试了.! I hate IE! *

由于我是用个 $.ajax, string.slice 都要 google 的菜鸟。找不到赐教人啊. 有没有靠谱点的 javascript 社区可以去混混的?! stackflow 的话明天试试看,不能很好用英语表达,怕说不清。= =

还有....csdn 真不想去.. 太丑了。= =

代码在这 (求赐教啊!!) https://github.com/ichord/At.js

@ichord 你的项目代码的 link 是个 404 页面。

#1 楼 @lgn21st 噢!! github 帮我改了用户名了。yeach.~

  • ruby-china 的 textarea 带了 autogrow 插件。这个会影响到 "@"字符 offset 的计算 测试了下....chrome,firefox.没有问题。= =
  • 当添加评论后,ajax 加入的"楼" 又会影响到 textarea offset 的计算。 自作多情的减了 $(window).scrollTop() = =

赞,这个东西非常不错!

你可以改标题了

#5 楼 @huacnlee done.今天把 bug 都修了修。But, IE...= =

IE8 9 都不行吗?

我觉得这个地方就无视 IE 吧。

#9 楼 @huacnlee 我用的 linux....测起来麻烦。还没测。

#9 楼 @huacnlee 兼容 IE6,7,8 了。哇咔咔

Great job dude... :)

You need to Sign in before reply, if you don't have an account, please Sign up first.