jquery 中的 Stack Overflow 风格标记系统
我想知道是否有一个与 Stack Overflow 标记系统预构建的克隆(或非常相似)。
我已经做了一些谷歌搜索,但是找不到任何由 jquery 提供支持的。
I am wondering if there is a prebuilt clone (or very similar) to the Stack Overflow tagging system.
I have done some Googling however cannot find any powered by jquery.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我的实现(我认为它比公认的答案更符合 SO 风格)。样式可能需要调整,但它的功能与您在 SO 上看到的相同。
功能:
采用预定义的输入字段,其中单词以逗号分隔 - 非常适合所有情况,例如您正在编辑已经具有标签的项目 - 并构建交互式标签编辑器从这些信息来看。
rails 格式的示例:
在用户编辑标签时更新隐藏的输入字段,以便提交的表单将具有所有所需的标签。
通过(假)标签输入字段向后删除在功能上与删除一长串单词相同,使编辑更加自然。
可以单击标签进行编辑。
逗号、空格、回车符和制表符关闭正在编辑或创建的开放标记。
标签上的关闭按钮按预期运行。
等
在这里找到它:http://jsfiddle.net/bradleygriffith/axjKm /
Here is my implementation (which I think is much more true to the SO style than is the accepted answer). The style may need tweaking but it's functionally the same as you see on SO.
Features:
Takes a predefined input field with words separated by commas -- perfect for all cases such as those in which you are editing an item that already has tags -- and builds the interactive tag editor from this information.
example in rails format:
Updates a hidden input field as the user edits tags so that the submitted form will have all desired tags.
Deleting backwards through the (fake) tag input field is functionally the same as deleting one long string of words, making editing more natural.
Tags can be clicked on to edit.
Commas, spaces, returns, and tabs close an open tag that is being edited or created.
Close button on tags functions as expected.
etc.
Find it here: http://jsfiddle.net/bradleygriffith/axjKm/
我最终构建了自己的实现:
http://webspirited.com/tagit/index .php?themeroller=true#demo8
I ended up building my own implementation:
http://webspirited.com/tagit/index.php?themeroller=true#demo8