I think the problem is very likely to be that that "tabs" plugin is killing your "click" events, preventing them from bubbling up to the body.
edit — it appears that that "tabs" plugin allows you to give it a "click" handler, which should I think return "true" to make it work:
$("ul.idTabs").idTabs({
click: function() {
console.log('in here???');
$('#innest .idTabs li a').remove('#triangle');
$(this).append('<img id="triangle" src="triangle.png" />');
return true; // I think
}
});
I don't know why you'd add all that HTML dynamically. Why not just include it directly into the page and hide it until you need it? It's really messy and error-prone to include lots of markup like that in the middle of your JavaScript code.