Skip to content

Instantly share code, notes, and snippets.

View dallarosa's full-sized avatar

Francisco Dalla Rosa Soares dallarosa

View GitHub Profile
@dallarosa
dallarosa / insert_after.js
Created December 20, 2010 09:34
Function for inserting some content (thread) after a marker(needle) inside a container (haystack). haystack should be and object.
function insert_after(haystack, needle, thread)
{
var browser=navigator.userAgent;
if((typeof haystack.innerText == 'undefined') || (!(browser.indexOf("MSIE")>0)))
{
var haystackText = haystack.innerHTML;
}
else