I am using this code to append some code to a div.
$(document).ready(function () {
$("div[style='padding-left: 6px;']").append("<table style=\"width: 6px; display: inline-block;\" cellspacing=\"0\" cellpadding=\"0\" toolbarspacer=\"true\"><tbody><tr><td></td></tr></tbody></table><div onclick=\"CallMethod()\" class=\" \" style=\"font-family: Verdana; font-size: 8pt; vertical-align: top; display: inline-block;\"><table style=\"display: inline;\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td height=\"28\"><div onmouseout=\"this.style.background=\'transparent\', this.style.border=\'1px transparent Solid\'\" onmouseover=\"this.style.background=\'#DDEEF7\', this.style.border=\'1px #336699 Solid\'\" id=\"rptViewer_ctl05_ctl05_ctl00_Email\"><div \" id=\"rptViewer_ctl05_ctl05_ctl00_ctl00_Email\" style=\"border: 1px solid transparent; border-image: none; cursor: default; background-color: transparent;\"><table title=\"Email\"><tbody><tr><td><input name=\"rptViewer$ctl05$ctl05$ctl00$ctl00$ctl00_Email\" title=\"Email\" style=\"width: 20px; height: 20px;\" type=\"image\" alt=\"Email\" src=\"" + url + "Images/email.png\" \"></td></tr></tbody></table></div><div disabled=\"disabled\" class=\"aspNetDisabled\" id=\"rptViewer_ctl05_ctl05_ctl00_ctl01_Email\" style=\"border: 1px solid transparent; border-image: none; display: none;\"><table title=\"E-Mail\"><tbody><tr><td><input name=\"rptViewer$ctl05$ctl05$ctl00$ctl01$ctl00_Email\" title=\"E-Mail\" disabled=\"disabled\" style=\"width: 20px; height: 20px; cursor: default;\" type=\"image\" alt=\"E-Mail\" src=\"" + url + "Images/email.png\"></td></tr></tbody></table></div></div></td></tr></tbody></table></div>");
});
This is working fine in IE. Find the screenshot.
I am using the code to add the highlighted email button. Clicking on this button I am calling a onclick event .
Kindly let me know another way for achieving the same or let me know where I am wrong?