HTML
<div id="wrapper">
<p>This is a basic tag input:
<input id="tag1" value="alpha,beta,gamma" />
</p>
</div>
<textarea id="tagdetect"></textarea>
script
$("#tagdetect").live("keydown",function(){
var textTyped=$("#tagdetect").val();
var text=textTyped.split(" ");
for(i=0;i<text.length;i++){
if(text[i]=="sql"||text[i]=="html"||text[i]=="java"){
$("#tag1").val()=text[i];
}
}
});
what i am trying to achieve
I am trying to add tags(ie values) in that input field when certain keywords are detected
Working version