title: Quotes breaking code in javascript onclick event using Jquery append
body: <p>I am  trying to pass two arguments in the on click javascript function. I need to enclose the the arguments in quotes. when i enclose it in single quotes it breaks the quote that starts from image and when i use double it breaks the quotes in front of javascript. how do i enclose it that it doesn't break my code?</p>
  
  <pre><code>$("#Div").append('&lt;img id ="myImage" src ="/images/myimage.png"  onclick="javascript:myfunction('addnew',$("#field").val())"/&gt; Error.')
  </code></pre>