My own jQuery html function, works faster
My own jQuery html function, works faster Posted by Alexander Shatalov Javascript html:function(div,html,outer){ if (typeof(div)=='object') var o=$(div).get(0); else var o=document.getElementById(div); if (!o) return false; if (typeof(html)=='undefined') return o.innerHTML; if (0&&outer) o.outerHTML=html; else o.innerHTML=html; var a=o.getElementsByTagName('script'),s,i; for (i in a) { if (!a[i] || !a[i].innerHTML) continue; $('<span>').html('<scr'+'ipt type="text/javascript">'+a[i].innerHTML+'</scr'+'ipt>').appendTo(document.body); } }, |