开发者

changing tokeniput jquery plugin to allow values to be hyperlinked?

i really love this jquery plugin called jquery tokeninput, but i want to know how i could change it to make the values autosuggested to be hyperlinked so they take you to another page! this plugin only lets you add values to textfield like tagging, thanks

the pluging is located here:

http://loopj.com/jquery-tokeninput/

the code is he开发者_开发技巧re for the plugin is here:

https://github.com/loopj/jquery-tokeninput/blob/master/src/jquery.tokeninput.js


You have to use either the onAdd or onResult callbacks. The onAdd doesn't allow you to edit the result so I had to use a selector to edit the token.

The JSON data also seems to only intrepret id and name. If it supported a value then the displayed value wouldn't have to match the url. I believe the jQueryUI autocomplete supports that.

http://jsfiddle.net/sATcY/1

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜