I'm trying to do a string replace in a textarea after the user has entered their content and nothing I've tried is working. Any help would be greatly appreciated. This is where I am:
<textarea id="field_id_29"></textarea>
$("#field_id_29").bind("change keyup input",function(){
var text = $("#field_id_29").val();
text = text.replace(/source/g,"www")
$("#field_id_29").val(text);
});
I need to replace www-source with www.
jsFiddle is here: http://jsfiddle.net/6RNY2/