title: Jquery how to add onclick in href
body: <p>how to add <code>onclick='openLightB('remove_ddi',500);'</code> in to <code>&lt;a&gt;open&lt;/a&gt;</code> with jquery function</p>
  
  <p>my present code is like this</p>
  
  <pre><code>$(".remove_row").live("click", function(){
    $(".ddi tr:eq(2) td:eq(5) a").replaceWith("&lt;a onclick='openLightB('remove_ddi',500);'&gt;Remove&lt;/a&gt;");
  });
  </code></pre>
  
  <p>unfortunately result coming like this</p>
  
  <pre><code>&lt;a remove_ddi',500);'="" onclick="openLightB("&gt;Remove&lt;/a&gt;
  </code></pre>