how to add onclick='openLightB('remove_ddi',500);' in to <a>open</a> with jquery function
my present code is like this
$(".remove_row").live("click", function(){
$(".ddi tr:eq(2) td:eq(5) a").replaceWith("<a onclick='openLightB('remove_ddi',500);'>Remove</a>");
});
unfortunately result coming like this
<a remove_ddi',500);'="" onclick="openLightB(">Remove</a>
How about letting jquery deal with escaping the quotes by using .attr():
DEMO
BTW, .live() is deprecated and could be removed from the library any time in the future. You should consider using .delegate() or .on() for event delegation.