开发者

a problem with autosuggestion and tagging using jquery?

开发者 https://www.devze.com 2023-02-18 01:47 出处:网络
i have this script that is meant to autosuggest values based on the input and then when a user selects a value from the drop down, it should turn itself into the tag, the problem is when i sel开发者_J

i have this script that is meant to autosuggest values based on the input and then when a user selects a value from the drop down, it should turn itself into the tag, the problem is when i sel开发者_JAVA技巧ect a value, it only tags the first 2 or 3 characters, you can check out the working script at js fiddle

http://jsfiddle.net/DTaMU/5/

first try typing GOOGLE then click add tag which works fine!

then try typing 'a' and selecting any value from the drop down box i.e Actionscript and see the tag, it only tags the first letter. thanks


I am not sure about your tag editor plugin and how you integrate with jquery ui dropdown, but it simply add the tag when the textbox lose focus cause 'a' being inserted. Note the dropdown designed to focus on the item cause the textbox lose focus. Please put the button and the added tags on the top so it not hidden when dropdown visible to see when it was added.

0

精彩评论

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

关注公众号