I have an input box where values are separated by commas. Since some of these values can be quite large, I thought I would use a bit of JQuery to split them in modal dialog so the user can see the list at a glance.
However, the JQuery code only works until the user edits one the fields, after which any attempts to use JQuery .val() or .attr(‘value’,’data’) has no effect.
My code is below for anyone interested:
The buttons work fine until you start changing the fields, then afterwards nothing changes.
Use
.val()to get/set the contents of thetextareaas well..Demo at http://jsfiddle.net/gaby/Y4YkL/1/