I have a div block with text inside:
<div>hello</div>
I have an input text field whose last entry is always the text inside the div. For example,
<input type="text"></input> with the user inputed text as "bob, james, hello"
On click with jquery, how can I make the text inside the div be subtracted from the string inside the input, leaving the input as:
<input type="text"></input> text as "bob, james,"
Your syntax is off a litte:
JQuery:
Working demo: http://jsfiddle.net/AlienWebguy/kCWtr/1/