andyet/ICanHaz.js — Issue #45: appending to my div then disappearing
Author: bytor99999
Created: 2012-01-31 05:50:24+00:00
State: open

Sorry for posting this here, but there doesn't seem to be any support links elsewhere. I am sure I am doing everything the way it is supposed to be, but for some reason after getting my template filled with my data and returning html. I do a simple .append() to my div and it then quickly disappears.

my js code

function showContent(divOfTemplateToDisplay, data) {
var addToContents = ich[divOfTemplateToDisplay](data);
$("#content").append(addToContents);
// right after here it shows up for a split second, then disappears
}

My script that is my template

My div in my html body to display the data

Content goes here

I don't think there is any other code running after it to clear or remove the contents.

Thanks

By the way as a newbie to js, jquery, single page apps, iCanHaz is really cool for templating quickly. Easy to understand and get running immediately.

Mark