Passing string parameter to user created jQuery function
<p>Via the <code>onClick</code> method of an a <code>href</code> tag I'm trying to pass three variables, two numbers and a string, to jQuery method I've created. The numbers are passed with no problem at all, but with respect to passing the string variable with <code>answer_text = TEST TEST</code>, I'm getting the error below. I think I'm encoding the string incorrectly. Can anyone point me in the right direction?</p>

<p>Firefox 15, Firebug, and Twitter bootstrap.</p>

<blockquote>
  <p>SyntaxError: missing } after property list</p>
</blockquote>

<pre><code>$().edit_answer({
  row: 0, 
  num_answer: 0, 
  answer_text: TEST TEST
});

onClick="$().edit_answer({
  row:' + row_id + ', 
  num_answer:' + num_ans + ',
  answer_text:\"' + ans +'\"
});"
</code></pre>

<p>The reason for all the quotes is the full a <code>href</code> tag is being generated dynamically</p>

<pre><code>jQuery.fn.edit_answer = function () {
    var args = arguments[0] || {};
    var row = args.row;
    var num_answer  =  args.num_answer;
    var answer_text = args.answer_text;
};
</code></pre>
